mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
11 lines
322 B
Python
11 lines
322 B
Python
from jedi.evaluate.helpers import fast_parent_copy
|
|
from jedi.parser import representation as pr
|
|
|
|
|
|
def test_fast_parent_copy():
|
|
name = pr.Name(object, [('hallo', (0, 0))], (0, 0), (0, 0))
|
|
|
|
# fast parent copy should switch parent
|
|
new_name = fast_parent_copy(name)
|
|
assert new_name.names[0].parent == new_name
|