[pypy-commit] pypy py3k: Add a codegen test for py3k's new tuple unpacking

rguillebert noreply at buildbot.pypy.org
Wed Jan 18 12:08:09 CET 2012


Author: Romain Guillebert <romain.py at gmail.com>
Branch: py3k
Changeset: r51434:68762432f02d
Date: 2012-01-18 12:07 +0100
http://bitbucket.org/pypy/pypy/changeset/68762432f02d/

Log:	Add a codegen test for py3k's new tuple unpacking

diff --git a/pypy/interpreter/astcompiler/test/test_compiler.py b/pypy/interpreter/astcompiler/test/test_compiler.py
--- a/pypy/interpreter/astcompiler/test/test_compiler.py
+++ b/pypy/interpreter/astcompiler/test/test_compiler.py
@@ -798,6 +798,13 @@
         yield self.st, test, "f()", 42
     # This line is needed for py.code to find the source.
 
+    def test_tuple_unpacking(self):
+        func = """def f():
+            (a, *b, c) = 1, 2, 3, 4, 5
+            return a, b, c
+        """
+        yield self.st, func, "f()", (1, [2, 3, 4], 5)
+
 
 class AppTestCompiler:
 


More information about the pypy-commit mailing list