[pypy-svn] r64293 - pypy/trunk/pypy/translator/c/test

tismer at codespeak.net tismer at codespeak.net
Fri Apr 17 18:38:23 CEST 2009

Author: tismer
Date: Fri Apr 17 18:38:20 2009
New Revision: 64293

added a test for setpgrp in order to trigger an error for fijal's
rev. 63693 which breaks building pypy-c on OS X.
But unfortunately, the opposite happens: The test passes after that change, and Macijey might have
thought it is correct to change this. In fact, something in PyPy isn't consistent, here.
setpgrp can have either none, or two arguments, depending on some platform settings.
I have to find out what this is, and why it is inconsistent between running test_extfunc and building pypy-c

Modified: pypy/trunk/pypy/translator/c/test/test_extfunc.py
--- pypy/trunk/pypy/translator/c/test/test_extfunc.py	(original)
+++ pypy/trunk/pypy/translator/c/test/test_extfunc.py	Fri Apr 17 18:38:20 2009
@@ -501,6 +501,14 @@
         f1 = compile(does_stuff, [])
         res = f1()
         assert res == os.getpid()
+if hasattr(os, 'setpgrp'):
+    def test_os_setpgrp():
+        def does_stuff():
+            return os.setpgrp()
+        f1 = compile(does_stuff, [])
+        res = f1()
+        assert res == os.setpgrp()
 if hasattr(os, 'link'):
     def test_links():

More information about the Pypy-commit mailing list