1
0
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:
Dave Halter
2017-08-12 22:48:49 +02:00
parent b26b8a1749
commit 88cfb2cb91
4 changed files with 149 additions and 10 deletions

View File

@@ -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):