[pypy-svn] r48028 - in pypy/dist/pypy/rpython/module: . test
fijal at codespeak.net
fijal at codespeak.net
Fri Oct 26 11:40:04 CEST 2007
Author: fijal
Date: Fri Oct 26 11:40:03 2007
New Revision: 48028
Modified:
pypy/dist/pypy/rpython/module/ll_os.py
pypy/dist/pypy/rpython/module/test/test_posix.py
Log:
Add os.getgid, rpython level
Modified: pypy/dist/pypy/rpython/module/ll_os.py
==============================================================================
--- pypy/dist/pypy/rpython/module/ll_os.py (original)
+++ pypy/dist/pypy/rpython/module/ll_os.py Fri Oct 26 11:40:03 2007
@@ -348,6 +348,10 @@
def register_os_getpid(self):
return self.extdef_for_os_function_returning_int('getpid')
+ @registering_if(os, 'getgid')
+ def register_os_getgid(self):
+ return self.extdef_for_os_function_returning_int('getgid')
+
@registering(os.open)
def register_os_open(self):
os_open = self.llexternal(underscore_on_windows+'open',
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 Fri Oct 26 11:40:03 2007
@@ -116,6 +116,12 @@
return os.getuid()
assert self.interpret(f, []) == f()
+ if hasattr(os, 'getgid'):
+ def test_getgid(self):
+ def f():
+ return os.getgid()
+ assert self.interpret(f, []) == f()
+
def test_os_wstar(self):
from pypy.rpython.module.ll_os import RegisterOs
for name in RegisterOs.w_star:
More information about the Pypy-commit
mailing list