mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 14:34:31 +08:00
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:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user