1
0
forked from VimPlug/jedi

Finally fixing the Python 2 issues with static_getattr.

This commit is contained in:
Dave Halter
2017-08-13 22:24:50 +02:00
parent 13a0d63091
commit a37201bc1d
3 changed files with 89 additions and 8 deletions

View File

@@ -177,7 +177,7 @@ def test_getitem_side_effects():
_assert_interpreter_complete('foo[0].', locals(), [])
def test_property_error():
def test_property_error_oldstyle():
lst = []
class Foo3():
@property
@@ -193,6 +193,22 @@ def test_property_error():
assert lst == []
def test_property_error_newstyle():
lst = []
class Foo3(object):
@property
def bar(self):
lst.append(1)
raise ValueError
foo = Foo3()
_assert_interpreter_complete('foo.bar', locals(), ['bar'])
_assert_interpreter_complete('foo.bar.baz', locals(), [])
# There should not be side effects
assert lst == []
def test_param_completion():
def foo(bar):
pass