Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r58326:4aec0e991a07
Date: 2012-10-21 19:11 +0200
http://bitbucket.org/pypy/pypy/changeset/4aec0e991a07/

Log:    Add a test for DUP_TOPX

diff --git a/pypy/objspace/flow/test/test_objspace.py 
b/pypy/objspace/flow/test/test_objspace.py
--- a/pypy/objspace/flow/test/test_objspace.py
+++ b/pypy/objspace/flow/test/test_objspace.py
@@ -1126,6 +1126,14 @@
         with py.test.raises(FlowingError):
             self.codetest(f)
 
+    def test_aug_assign(self):
+        # test for DUP_TOPX
+        lst = [2, 3, 4]
+        def f(x, y):
+            lst[x] += y
+        graph = self.codetest(f)
+        assert self.all_operations(graph) == {'xxx': 1}
+
 DATA = {'x': 5,
         'y': 6}
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to