mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-22 13:21:26 +08:00
descriptor tests for the used methods
This commit is contained in:
@@ -255,13 +255,24 @@ class RevealAccess(object):
|
|||||||
print('Updating', self.name)
|
print('Updating', self.name)
|
||||||
self.val = val
|
self.val = val
|
||||||
|
|
||||||
|
def just_a_method(self):
|
||||||
|
pass
|
||||||
|
|
||||||
class C(object):
|
class C(object):
|
||||||
x = RevealAccess(10, 'var "x"')
|
x = RevealAccess(10, 'var "x"')
|
||||||
#? RevealAccess()
|
#? RevealAccess()
|
||||||
x
|
x
|
||||||
#? ['__get__']
|
#? ['just_a_method']
|
||||||
x.__get__
|
x.just_a_method
|
||||||
y = 5.0
|
y = 5.0
|
||||||
|
def __init__(self):
|
||||||
|
#? int()
|
||||||
|
self.x
|
||||||
|
|
||||||
|
#? []
|
||||||
|
self.just_a_method
|
||||||
|
#? []
|
||||||
|
C.just_a_method
|
||||||
|
|
||||||
m = C()
|
m = C()
|
||||||
#? int()
|
#? int()
|
||||||
@@ -271,6 +282,11 @@ m.y
|
|||||||
#? int()
|
#? int()
|
||||||
C.x
|
C.x
|
||||||
|
|
||||||
|
#? []
|
||||||
|
m.just_a_method
|
||||||
|
#? []
|
||||||
|
C.just_a_method
|
||||||
|
|
||||||
# -----------------
|
# -----------------
|
||||||
# properties
|
# properties
|
||||||
# -----------------
|
# -----------------
|
||||||
|
|||||||
Reference in New Issue
Block a user