[pypy-commit] pypy py3k: adapt this test to the new division semantics

antocuni noreply at buildbot.pypy.org
Thu Feb 9 14:38:26 CET 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r52277:806db631a1ef
Date: 2012-02-09 14:35 +0100
http://bitbucket.org/pypy/pypy/changeset/806db631a1ef/

Log:	adapt this test to the new division semantics

diff --git a/pypy/interpreter/test/test_compiler.py b/pypy/interpreter/test/test_compiler.py
--- a/pypy/interpreter/test/test_compiler.py
+++ b/pypy/interpreter/test/test_compiler.py
@@ -800,10 +800,8 @@
         assert len(co.co_consts) == 2
         assert co.co_consts[0] == 2
         co = code("x = 10/4")
-        assert len(co.co_consts) == 3
-        assert co.co_consts[:2] == (10, 4)
-        co = code("from __future__ import division\nx = 10/4")
-        assert co.co_consts[2] == 2.5
+        assert len(co.co_consts) == 2
+        assert co.co_consts[0] == 2.5
 
     def test_tuple_folding(self):
         co = compile("x = (1, 2, 3)", "<test>", "exec")


More information about the pypy-commit mailing list