summaryrefslogtreecommitdiff
path: root/tests/test_pycode_parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_pycode_parser.py')
-rw-r--r--tests/test_pycode_parser.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_pycode_parser.py b/tests/test_pycode_parser.py
index 0ff4752b3..d794376fa 100644
--- a/tests/test_pycode_parser.py
+++ b/tests/test_pycode_parser.py
@@ -121,12 +121,17 @@ def test_complex_assignment():
@pytest.mark.skipif(PY2, reason='tests for py3 syntax')
def test_complex_assignment_py3():
- source = 'a, *b, c = (1, 2, 3, 4) #: unpack assignment\n'
+ source = ('a, *b, c = (1, 2, 3, 4) #: unpack assignment\n'
+ 'd, *self.attr = (5, 6, 7) #: unpack assignment2\n'
+ 'e, *f[0] = (8, 9, 0) #: unpack assignment3\n'
+ )
parser = Parser(source)
parser.parse()
assert parser.comments == {('', 'a'): 'unpack assignment',
('', 'b'): 'unpack assignment',
('', 'c'): 'unpack assignment',
+ ('', 'd'): 'unpack assignment2',
+ ('', 'e'): 'unpack assignment3',
}
assert parser.definitions == {}