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

fijal at codespeak.net fijal at codespeak.net
Wed Jul 25 12:23:13 CEST 2007


Author: fijal
Date: Wed Jul 25 12:23:13 2007
New Revision: 45318

Modified:
   pypy/dist/pypy/rpython/module/test/test_ll_os.py
Log:
Add a compile test.


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	Wed Jul 25 12:23:13 2007
@@ -5,6 +5,7 @@
 
 from pypy.rpython.lltypesystem.module.ll_os import Implementation as impl
 import sys
+import py
 
 def test_access():
     filename = str(udir.join('test_access.txt'))
@@ -112,6 +113,19 @@
         for value in [0, 1, 127, 128, 255]:
             assert fn(value) == fun(value)
 
+def test_os_uname(self):
+    if not hasattr(os, 'uname'):
+        py.test.skip("os.uname does not exist")
+    from pypy.translator.c.test.test_genc import compile
+    for num in range(5):
+        def fun():
+            return os.uname()[num]
+        fn = compile(fun, [])
+        assert fn() == os.uname()[num]
+
+def test_os_uname():
+    
+
 class ExpectTestOs:
     def setup_class(cls):
         if not hasattr(os, 'ttyname'):



More information about the Pypy-commit mailing list