mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-15 10:07:06 +08:00
Add TestGetDefinitions.test_dotted_assignment
This commit is contained in:
@@ -405,6 +405,14 @@ class TestGetDefinitions(TestBase):
|
|||||||
self.assertEqual([d.name for d in definitions],
|
self.assertEqual([d.name for d in definitions],
|
||||||
['module', 'Class', 'func', 'data'])
|
['module', 'Class', 'func', 'data'])
|
||||||
|
|
||||||
|
def test_dotted_assignment(self):
|
||||||
|
definitions = api.get_definitions("""
|
||||||
|
x = Class()
|
||||||
|
x.y.z = None
|
||||||
|
""")
|
||||||
|
self.assertEqual([d.name for d in definitions],
|
||||||
|
['x'])
|
||||||
|
|
||||||
def test_multiple_assignment(self):
|
def test_multiple_assignment(self):
|
||||||
definitions = api.get_definitions("""
|
definitions = api.get_definitions("""
|
||||||
x = y = None
|
x = y = None
|
||||||
|
|||||||
Reference in New Issue
Block a user