[pypy-svn] r45631 - pypy/dist/pypy/rpython/module/test

fijal at codespeak.net fijal at codespeak.net
Mon Aug 13 17:34:14 CEST 2007


Author: fijal
Date: Mon Aug 13 17:34:13 2007
New Revision: 45631

Modified:
   pypy/dist/pypy/rpython/module/test/test_ll_os.py
   pypy/dist/pypy/rpython/module/test/test_posix.py
Log:
Move test to be interpreted


Modified: pypy/dist/pypy/rpython/module/test/test_ll_os.py
==============================================================================
--- pypy/dist/pypy/rpython/module/test/test_ll_os.py	(original)
+++ pypy/dist/pypy/rpython/module/test/test_ll_os.py	Mon Aug 13 17:34:13 2007
@@ -106,16 +106,6 @@
     compared_with.sort()
     assert result == compared_with
 
-def test_os_wstar():
-    from pypy.rpython.module.ll_os import RegisterOs
-    for name in RegisterOs.w_star:
-        def fun(s):
-            return getattr(os, name)(s)
-
-        fn = compile(fun, [int])
-        for value in [0, 1, 127, 128, 255]:
-            assert fn(value) == fun(value)        
-
 class ExpectTestOs:
     def setup_class(cls):
         if not hasattr(os, 'ttyname'):

Modified: pypy/dist/pypy/rpython/module/test/test_posix.py
==============================================================================
--- pypy/dist/pypy/rpython/module/test/test_posix.py	(original)
+++ pypy/dist/pypy/rpython/module/test/test_posix.py	Mon Aug 13 17:34:13 2007
@@ -122,6 +122,15 @@
         assert realfile.read() == 'xxx'
         self.interpret(f2, [fd])
 
+    def test_os_wstar(self):
+        from pypy.rpython.module.ll_os import RegisterOs
+        for name in RegisterOs.w_star:
+            def fun(s):
+                return getattr(os, name)(s)
+
+            for value in [0, 1, 127, 128, 255]:
+                assert self.interpret(fun, [value]) == fun(value)        
+
 def test_tmpfile_translate():
     from pypy.rlib import ros
     def f():



More information about the Pypy-commit mailing list