[pypy-svn] r46437 - in pypy/dist/pypy: rpython/test translator/cli/test translator/jvm/test

antocuni at codespeak.net antocuni at codespeak.net
Mon Sep 10 14:01:43 CEST 2007


Author: antocuni
Date: Mon Sep 10 14:01:43 2007
New Revision: 46437

Modified:
   pypy/dist/pypy/rpython/test/test_rbuiltin.py
   pypy/dist/pypy/rpython/test/tool.py
   pypy/dist/pypy/translator/cli/test/runtest.py
   pypy/dist/pypy/translator/cli/test/test_builtin.py
   pypy/dist/pypy/translator/jvm/test/runtest.py
Log:
skip os.path tests only on the llinterpreter, not in the backends



Modified: pypy/dist/pypy/rpython/test/test_rbuiltin.py
==============================================================================
--- pypy/dist/pypy/rpython/test/test_rbuiltin.py	(original)
+++ pypy/dist/pypy/rpython/test/test_rbuiltin.py	Mon Sep 10 14:01:43 2007
@@ -248,7 +248,7 @@
         assert count == 1
 
     def test_os_path_exists(self):
-        py.test.skip("cannot call os.stat() on the llinterp yet")
+        self._skip_llinterpreter("os.stat()")
         import os
         def f(fn):
             return os.path.exists(fn)
@@ -258,7 +258,7 @@
             self.string_to_ll("strange_filename_that_looks_improbable.sde")]) == False
 
     def test_os_isdir(self):
-        py.test.skip("cannot call os.stat() on the llinterp yet")
+        self._skip_llinterpreter("os.stat()")
         import os
         def f(fn):
             return os.path.isdir(fn)
@@ -357,7 +357,7 @@
         assert self.class_name(res) == 'B'
 
     def test_os_path_join(self):
-        self._skip_oo("os path oofakeimpl")
+        self._skip_llinterpreter("os path oofakeimpl", skipLL=False)
         import os.path
         def fn(a, b):
             return os.path.join(a, b)

Modified: pypy/dist/pypy/rpython/test/tool.py
==============================================================================
--- pypy/dist/pypy/rpython/test/tool.py	(original)
+++ pypy/dist/pypy/rpython/test/tool.py	Mon Sep 10 14:01:43 2007
@@ -22,10 +22,11 @@
     def is_of_type(self, x, type_):
         return type(x) is type_
 
-    def _skip_oo(self, reason):
-        if self.type_system == 'ootype':
-            py.test.skip("ootypesystem doesn't support %s, yet" % reason)
-    
+    def _skip_llinterpreter(self, reason, skipLL=True, skipOO=True):
+        if skipLL and self.type_system == 'lltype':
+            py.test.skip("lltypesystem doesn't support %s, yet" % reason)        
+        if skipOO and self.type_system == 'ootype':
+            py.test.skip("ootypesystem doesn't support %s, yet" % reason)    
 
 class LLRtypeMixin(object):
     type_system = 'lltype'

Modified: pypy/dist/pypy/translator/cli/test/runtest.py
==============================================================================
--- pypy/dist/pypy/translator/cli/test/runtest.py	(original)
+++ pypy/dist/pypy/translator/cli/test/runtest.py	Mon Sep 10 14:01:43 2007
@@ -267,6 +267,9 @@
         if platform.processor() == 'powerpc':
             py.test.skip('PowerPC --> %s' % reason)
 
+    def _skip_llinterpreter(self, reason, skipLL=True, skipOO=True):
+        pass
+
     def interpret(self, fn, args, annotation=None, backendopt=True, exctrans=False):
         f = self._compile(fn, args, annotation, backendopt=backendopt, exctrans=exctrans)
         res = f(*args)

Modified: pypy/dist/pypy/translator/cli/test/test_builtin.py
==============================================================================
--- pypy/dist/pypy/translator/cli/test/test_builtin.py	(original)
+++ pypy/dist/pypy/translator/cli/test/test_builtin.py	Mon Sep 10 14:01:43 2007
@@ -138,12 +138,6 @@
     # XXX: remember to test ll_os_readlink and ll_os_pipe as soon as
     # they are implemented
 
-    def test_os_path_join(self):
-        import os.path
-        def fn(a, b):
-            return os.path.join(a, b)
-        res = self.ll_to_string(self.interpret(fn, ['a', 'b']))
-        assert res == os.path.join('a', 'b')
 
 class TestCliTime(CliTest, BaseTestTime):
 

Modified: pypy/dist/pypy/translator/jvm/test/runtest.py
==============================================================================
--- pypy/dist/pypy/translator/jvm/test/runtest.py	(original)
+++ pypy/dist/pypy/translator/jvm/test/runtest.py	Mon Sep 10 14:01:43 2007
@@ -104,6 +104,9 @@
         if platform.processor() == 'powerpc':
             py.test.skip('PowerPC --> %s' % reason)
 
+    def _skip_llinterpreter(self, reason, skipLL=True, skipOO=True):
+        pass
+
     def interpret(self, fn, args, annotation=None):
         detect_missing_support_programs()
         try:



More information about the Pypy-commit mailing list