[pypy-svn] r18087 - in pypy/dist/pypy: rpython/test translator/c/test

arigo at codespeak.net arigo at codespeak.net
Sun Oct 2 19:10:42 CEST 2005


Author: arigo
Date: Sun Oct  2 19:10:41 2005
New Revision: 18087

Modified:
   pypy/dist/pypy/rpython/test/test_rfloat.py
   pypy/dist/pypy/translator/c/test/test_typed.py
Log:
Minor fixes.


Modified: pypy/dist/pypy/rpython/test/test_rfloat.py
==============================================================================
--- pypy/dist/pypy/rpython/test/test_rfloat.py	(original)
+++ pypy/dist/pypy/rpython/test/test_rfloat.py	Sun Oct  2 19:10:41 2005
@@ -53,4 +53,4 @@
         return str(f)
 
     res = interpret(fn, [1.5])
-    assert eval(''.join(res.chars)) == 1.5
+    assert float(''.join(res.chars)) == 1.5

Modified: pypy/dist/pypy/translator/c/test/test_typed.py
==============================================================================
--- pypy/dist/pypy/translator/c/test/test_typed.py	(original)
+++ pypy/dist/pypy/translator/c/test/test_typed.py	Sun Oct  2 19:10:41 2005
@@ -295,7 +295,8 @@
         def fn(i=float):
             return str(i)
         f = self.getcompiled(fn)
-        assert f(1.0) == fn(1.0)
+        res = f(1.0)
+        assert type(res) is str and float(res) == 1.0
         
     def test_uint_arith(self):
         def fn(i=r_uint):



More information about the Pypy-commit mailing list