Author: Armin Rigo <[email protected]>
Branch:
Changeset: r60227:0bbf95bbb3b1
Date: 2013-01-20 11:02 +0100
http://bitbucket.org/pypy/pypy/changeset/0bbf95bbb3b1/
Log: A second test, from issue #1364.
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
@@ -793,6 +793,25 @@
"""
self.simple_test(source, 'ok', 1)
+ def test_assign_to_empty_list_2(self):
+ source = """if 1:
+ for i in range(5):
+ try: [] = 1, 2, 3
+ except ValueError: pass
+ else: raise AssertionError
+ try: [] = a = 1
+ except TypeError: pass
+ else: raise AssertionError
+ try: [] = _ = iter(['foo'])
+ except ValueError: pass
+ else: raise AssertionError
+ try: [], _ = iter(['foo']), 1
+ except ValueError: pass
+ else: raise AssertionError
+ ok = 1
+ """
+ self.simple_test(source, 'ok', 1)
+
class AppTestCompiler:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit