mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 23:04:48 +08:00
Move the python parser tree.
This commit is contained in:
@@ -6,7 +6,7 @@ import pytest
|
||||
|
||||
from jedi._compatibility import u, unicode
|
||||
from jedi.parser.python import parse
|
||||
from jedi.parser import tree as pt
|
||||
from jedi.parser.python import tree
|
||||
|
||||
|
||||
class TestsFunctionAndLambdaParsing(object):
|
||||
@@ -34,14 +34,14 @@ class TestsFunctionAndLambdaParsing(object):
|
||||
@pytest.fixture()
|
||||
def expected(self, request, node):
|
||||
return request.keywords['expected']
|
||||
|
||||
|
||||
def test_name(self, node, expected):
|
||||
assert isinstance(node.name, pt.Name)
|
||||
assert isinstance(node.name, tree.Name)
|
||||
assert unicode(node.name) == u(expected['name'])
|
||||
|
||||
|
||||
def test_params(self, node, expected):
|
||||
assert isinstance(node.params, list)
|
||||
assert all(isinstance(x, pt.Param) for x in node.params)
|
||||
assert all(isinstance(x, tree.Param) for x in node.params)
|
||||
assert [unicode(x.name) for x in node.params] == [u(x) for x in expected['params']]
|
||||
|
||||
def test_is_generator(self, node, expected):
|
||||
|
||||
Reference in New Issue
Block a user