[pypy-svn] pypy default: fixed the ll getgroups test

berdario commits-noreply at bitbucket.org
Mon Jan 24 14:38:04 CET 2011


Author: Dario Bertini <berdario at gmail.com>
Branch: 
Changeset: r41259:cc178bff60b8
Date: 2011-01-24 14:10 +0100
http://bitbucket.org/pypy/pypy/changeset/cc178bff60b8/

Log:	fixed the ll getgroups test

diff --git a/pypy/rpython/module/test/test_posix.py b/pypy/rpython/module/test/test_posix.py
--- a/pypy/rpython/module/test/test_posix.py
+++ b/pypy/rpython/module/test/test_posix.py
@@ -149,12 +149,6 @@
             def f():
                 return os.getgid()
             assert self.interpret(f, []) == f()
-            
-    if hasattr(os, 'getgroups'):
-        def test_getgroups(self):
-            def f():
-                return os.getgroups()
-            assert self.interpret(f, []) == f()
 
     if hasattr(os, 'setuid'):
         def test_os_setuid(self):
@@ -193,7 +187,13 @@
                 assert res == fun(value)        
 
 class TestLLtype(BaseTestPosix, LLRtypeMixin):
-    pass
+
+    if hasattr(os, 'getgroups'):
+        def test_getgroups(self):
+            def f():
+                return os.getgroups()
+            ll_a = self.interpret(f, [])
+            assert self.ll_to_list(ll_a) == f()
 
 class TestOOtype(BaseTestPosix, OORtypeMixin):
     def test_fstat(self):


More information about the Pypy-commit mailing list