[pypy-commit] pypy more-rposix: Fix various tests

amauryfa noreply at buildbot.pypy.org
Fri Dec 5 22:15:43 CET 2014


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: more-rposix
Changeset: r74841:76feb483c6b4
Date: 2014-11-11 21:00 +0100
http://bitbucket.org/pypy/pypy/changeset/76feb483c6b4/

Log:	Fix various tests

diff --git a/rpython/flowspace/test/test_objspace.py b/rpython/flowspace/test/test_objspace.py
--- a/rpython/flowspace/test/test_objspace.py
+++ b/rpython/flowspace/test/test_objspace.py
@@ -10,6 +10,7 @@
 from rpython.flowspace.flowcontext import FlowingError, FlowContext
 from rpython.conftest import option
 from rpython.tool.stdlib_opcode import host_bytecode_spec
+from rpython.rlib import rposix
 
 import os
 import operator
@@ -1261,9 +1262,9 @@
         self.show(x)
         ops = x.startblock.operations
         assert ops[0].opname == 'simple_call'
-        assert ops[0].args[0].value is os.unlink
+        assert ops[0].args[0].value is rposix.unlink
         assert ops[1].opname == 'simple_call'
-        assert ops[1].args[0].value is os.unlink
+        assert ops[1].args[0].value is rposix.unlink
 
     def test_rabspath(self):
         import os.path
diff --git a/rpython/rtyper/module/test/test_posix.py b/rpython/rtyper/module/test/test_posix.py
--- a/rpython/rtyper/module/test/test_posix.py
+++ b/rpython/rtyper/module/test/test_posix.py
@@ -211,7 +211,9 @@
 
     def test_os_wstar(self):
         from rpython.rtyper.module.ll_os import RegisterOs
-        for name in RegisterOs.w_star:
+        for name in ['WCOREDUMP', 'WIFCONTINUED', 'WIFSTOPPED',
+                     'WIFSIGNALED', 'WIFEXITED',
+                     'WEXITSTATUS', 'WSTOPSIG', 'WTERMSIG']:
             if not hasattr(os, name):
                 continue
             def fun(s):
diff --git a/rpython/rtyper/test/test_rbuiltin.py b/rpython/rtyper/test/test_rbuiltin.py
--- a/rpython/rtyper/test/test_rbuiltin.py
+++ b/rpython/rtyper/test/test_rbuiltin.py
@@ -284,7 +284,7 @@
         count = 0
         for dir_call in enum_direct_calls(test_llinterp.typer.annotator.translator, wr_open):
             cfptr = dir_call.args[0]
-            assert self.get_callable(cfptr.value).__name__.startswith('os_open')
+            assert self.get_callable(cfptr.value).__name__ == 'open'
             count += 1
         assert count == 1
 


More information about the pypy-commit mailing list