forked from VimPlug/jedi
Get a lot of tests passing
This commit is contained in:
@@ -50,12 +50,12 @@ def test_parse_function_doc_illegal_docstr():
|
||||
assert ('', '') == compiled._parse_function_doc(docstr)
|
||||
|
||||
|
||||
def test_doc():
|
||||
def test_doc(evaluator):
|
||||
"""
|
||||
Even CompiledObject docs always return empty docstrings - not None, that's
|
||||
just a Jedi API definition.
|
||||
"""
|
||||
obj = compiled.CompiledObject(_evaluator(), ''.__getnewargs__)
|
||||
obj = compiled.create(evaluator, ''.__getnewargs__)
|
||||
assert obj.py__doc__() == ''
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ from jedi._compatibility import py_version, unicode
|
||||
|
||||
def _eval_literal(code):
|
||||
def_, = jedi.Script(code).goto_definitions()
|
||||
return def_._name._context.obj
|
||||
return def_._name._context.access._obj
|
||||
|
||||
|
||||
@pytest.mark.skipif('sys.version_info[:2] < (3, 6)')
|
||||
|
||||
@@ -14,4 +14,4 @@ def test_equals(source):
|
||||
script = Script(source)
|
||||
node = script._get_module_node().children[0]
|
||||
first, = script._get_module().eval_node(node)
|
||||
assert isinstance(first, CompiledObject) and first.obj is True
|
||||
assert isinstance(first, CompiledObject) and first.access._obj is True
|
||||
|
||||
Reference in New Issue
Block a user