1
0
forked from VimPlug/jedi

remove NoErrorTokenizer dependency for all but the fast parsers

This commit is contained in:
Dave Halter
2014-02-24 10:31:15 +01:00
parent 553ff66c8b
commit 9257062910
3 changed files with 25 additions and 10 deletions

View File

@@ -2,6 +2,7 @@ from jedi._compatibility import u
from jedi.parser import Parser
from jedi.parser.user_context import UserContextParser
from jedi.parser import representation as pr
from textwrap import dedent
def test_user_statement_on_import():
@@ -95,3 +96,15 @@ def test_module():
assert str(name) == ''
assert name.start_pos == (0, 0)
assert name.end_pos == (0, 0)
def test_end_pos():
s = u(dedent('''
x = ['a', 'b', 'c']
def func():
y = None
'''))
parser = Parser(s)
scope = parser.module.subscopes[0]
assert scope.start_pos == (3, 0)
assert scope.end_pos == (5, 0)