mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-10 15:51:51 +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],
|
||||
['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):
|
||||
definitions = api.get_definitions("""
|
||||
x = y = None
|
||||
|
||||
Reference in New Issue
Block a user