Make some test code prettier

This commit is contained in:
Dave Halter
2020-01-01 17:36:42 +01:00
parent cab7c6fdc7
commit 9dc18054ee

View File

@@ -8,7 +8,7 @@ import pytest
import jedi import jedi
from jedi._compatibility import is_py3, py_version from jedi._compatibility import is_py3, py_version
from jedi.inference.compiled import mixed, value from jedi.inference.compiled import mixed
from importlib import import_module from importlib import import_module
if py_version > 30: if py_version > 30:
@@ -255,6 +255,7 @@ def allow_unsafe_getattr(request, monkeypatch):
def test_property_error_oldstyle(allow_unsafe_getattr): def test_property_error_oldstyle(allow_unsafe_getattr):
lst = [] lst = []
class Foo3: class Foo3:
@property @property
def bar(self): def bar(self):
@@ -274,6 +275,7 @@ def test_property_error_oldstyle(allow_unsafe_getattr):
def test_property_error_newstyle(allow_unsafe_getattr): def test_property_error_newstyle(allow_unsafe_getattr):
lst = [] lst = []
class Foo3(object): class Foo3(object):
@property @property
def bar(self): def bar(self):
@@ -375,9 +377,9 @@ def test_more_complex_instances():
def wow(self): def wow(self):
return Something() return Something()
#script = jedi.Interpreter('Base().wow().foo', [locals()]) script = jedi.Interpreter('Base().wow().foo', [locals()])
#c, = script.complete() c, = script.complete()
#assert c.name == 'foo' assert c.name == 'foo'
x = Base() x = Base()
script = jedi.Interpreter('x.wow().foo', [locals()]) script = jedi.Interpreter('x.wow().foo', [locals()])