Author: Raffael Tfirst <[email protected]>
Branch: py3.5
Changeset: r85605:fe3dcd041142
Date: 2016-07-08 11:20 +0200
http://bitbucket.org/pypy/pypy/changeset/fe3dcd041142/
Log: Add parser test for unpack
diff --git a/pypy/interpreter/pyparser/test/test_pyparse.py
b/pypy/interpreter/pyparser/test/test_pyparse.py
--- a/pypy/interpreter/pyparser/test/test_pyparse.py
+++ b/pypy/interpreter/pyparser/test/test_pyparse.py
@@ -167,6 +167,12 @@
py.test.raises(SyntaxError, self.parse, 'f()\n# blah\nblah()',
"single")
py.test.raises(SyntaxError, self.parse, 'f()\nxy # blah\nblah()',
"single")
py.test.raises(SyntaxError, self.parse, 'x = 5 # comment\nx = 6\n',
"single")
+
+ def test_unpack(self):
+ self.parse('[*{2}, 3, *[4]]')
+ self.parse('{*{2}, 3, *[4]}')
+ self.parse('{**{}, 3:4, **{5:6, 7:8}}')
+ self.parse('f(2, *a, *b, **b, **c, **d)')
class TestPythonParserWithSpace:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit