[pypy-svn] r9218 - pypy/dist/pypy/interpreter/test

arigo at codespeak.net arigo at codespeak.net
Mon Feb 14 20:24:05 CET 2005


Author: arigo
Date: Mon Feb 14 20:24:05 2005
New Revision: 9218

Modified:
   pypy/dist/pypy/interpreter/test/test_eval.py
   pypy/dist/pypy/interpreter/test/test_exec.py
Log:
Changed our tests from  "assert not a != b"  to  "assert a == b".


Modified: pypy/dist/pypy/interpreter/test/test_eval.py
==============================================================================
--- pypy/dist/pypy/interpreter/test/test_eval.py	(original)
+++ pypy/dist/pypy/interpreter/test/test_eval.py	Mon Feb 14 20:24:05 2005
@@ -45,7 +45,7 @@
     def sameList(self, l1, l2):
         assert len(l1) == len(l2) 
         for w_1, w_2 in zip(l1, l2):
-            assert not ((w_1 is UNDEFINED) != (w_2 is UNDEFINED))
+            assert (w_1 is UNDEFINED) == (w_2 is UNDEFINED)
             if w_1 is not UNDEFINED:
                 assert self.space.eq_w(w_1, w_2) 
 

Modified: pypy/dist/pypy/interpreter/test/test_exec.py
==============================================================================
--- pypy/dist/pypy/interpreter/test/test_exec.py	(original)
+++ pypy/dist/pypy/interpreter/test/test_exec.py	Mon Feb 14 20:24:05 2005
@@ -10,12 +10,12 @@
         g = {}
         l = {}
         exec "a = 3" in g, l
-        assert not l['a'] != 3
+        assert l['a'] == 3
 
     def test_localfill(self):
         g = {}
         exec "a = 3" in g
-        assert not g['a'] != 3
+        assert g['a'] == 3
         
     def test_builtinsupply(self):
         g = {}
@@ -37,7 +37,7 @@
         g = {}
         l = {}
         exec co in g, l
-        assert not l['a'] != 3
+        assert l['a'] == 3
         
 ##    # Commented out as PyPy give errors using open()
 ##    #     ["Not availible in restricted mode"]
@@ -50,18 +50,18 @@
     def test_implicit(self):
         a = 4
         exec "a = 3"
-        assert not a !=3
+        assert a == 3
 
     def test_tuplelocals(self):
         g = {}
         l = {}
         exec ("a = 3", g, l)
-        assert not l['a'] != 3
+        assert l['a'] == 3
         
     def test_tupleglobals(self):
         g = {}
         exec ("a = 3", g)
-        assert not g['a'] != 3
+        assert g['a'] == 3
 
     def test_exceptionfallthrough(self):
         def f():



More information about the Pypy-commit mailing list