1
0
forked from VimPlug/jedi

add property tests for renaming and removed some limitations of renaming, fixes davidhalter/jedi-vim#57

This commit is contained in:
David Halter
2012-12-27 00:03:02 +01:00
parent a7deb4766f
commit d1f23444b1
2 changed files with 32 additions and 16 deletions

View File

@@ -142,7 +142,7 @@ class Super(object):
def base_method(self):
#< 13 (0,13), (20,13)
self.base_var = 1
#< 13 (0,13), (29,13)
#< 13 (0,13), (24,13), (29,13)
self.instance_var = 1
#< 8 (0,8),
@@ -173,3 +173,33 @@ class TestClass(Super):
def just_a_method(self):
#< (-5,13), (0,13), (-29,13)
self.instance_var
# -----------------
# properties
# -----------------
class TestProperty:
@property
#< 10 (0,8), (5,13)
def prop(self):
return 1
def a(self):
#< 13 (-5,8), (0,13)
self.prop
@property
#< 13 (0,8), (4,5)
def rw_prop(self):
return self._rw_prop
#< 8 (-4,8), (0,5)
@rw_prop.setter
#< 8 (0,8), (5,13)
def rw_prop(self, value):
self._rw_prop = value
def b(self):
#< 13 (-5,8), (0,13)
self.rw_prop