CompiledObject.name returns a Name now, not a string. This is more consistent with the Jedi design and doesn't lead to bugs while ducktyping.

This commit is contained in:
Dave Halter
2014-09-03 19:43:21 +02:00
parent 18204c4c19
commit bb5ffe9343
5 changed files with 8 additions and 10 deletions

View File

@@ -90,14 +90,14 @@ def test_module():
module = Parser(u('asdf'), 'example.py', no_docstr=True).module
name = module.name
assert str(name) == 'example'
assert name.start_pos == (0, 0)
assert name.end_pos == (0, 7)
assert name.start_pos == (1, 0)
assert name.end_pos == (1, 7)
module = Parser(u('asdf'), no_docstr=True).module
name = module.name
assert str(name) == ''
assert name.start_pos == (0, 0)
assert name.end_pos == (0, 0)
assert name.start_pos == (1, 0)
assert name.end_pos == (1, 0)
def test_end_pos():