forked from VimPlug/jedi
Remove side effects when accessing jedi from the interpreter.
Note that there is http://bugs.python.org/issue31184. Fixes #925.
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
Tests of ``jedi.api.Interpreter``.
|
||||
"""
|
||||
|
||||
from ..helpers import TestCase
|
||||
import jedi
|
||||
from jedi._compatibility import is_py33
|
||||
from jedi.evaluate.compiled import mixed
|
||||
@@ -179,15 +178,20 @@ def test_getitem_side_effects():
|
||||
|
||||
|
||||
def test_property_error():
|
||||
lst = []
|
||||
class Foo3():
|
||||
@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):
|
||||
|
||||
Reference in New Issue
Block a user