mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-09 14:25:47 +08:00
Finally fixing the Python 2 issues with static_getattr.
This commit is contained in:
1 parent
13a0d63091
commit
a37201bc1d
3 files changed
+89
-8
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user