[pypy-svn] r64332 - pypy/trunk/pypy/module/_sre/test

fijal at codespeak.net fijal at codespeak.net
Sat Apr 18 17:32:57 CEST 2009


Author: fijal
Date: Sat Apr 18 17:32:56 2009
New Revision: 64332

Modified:
   pypy/trunk/pypy/module/_sre/test/test_app_sre.py
Log:
a hack to allow this test to run as well as appdirect test


Modified: pypy/trunk/pypy/module/_sre/test/test_app_sre.py
==============================================================================
--- pypy/trunk/pypy/module/_sre/test/test_app_sre.py	(original)
+++ pypy/trunk/pypy/module/_sre/test/test_app_sre.py	Sat Apr 18 17:32:56 2009
@@ -2,7 +2,8 @@
 import autopath
 from py.test import raises, skip
 from pypy.interpreter.gateway import app2interp_temp
-from pypy.conftest import gettestobjspace
+from pypy.conftest import gettestobjspace, option
+from py.__.test.outcome import Skipped
 
 def init_globals_hack(space):
     space.appexec([space.wrap(autopath.this_dir)], """(this_dir):
@@ -285,7 +286,10 @@
 
     def setup_class(cls):
         # This imports support_test_sre as the global "s"
-        cls.space = gettestobjspace(usemodules=('_locale',))
+        try:
+            cls.space = gettestobjspace(usemodules=('_locale',))
+        except Skipped:
+            cls.space = gettestobjspace(usemodules=('_rawffi',))
         init_globals_hack(cls.space)
 
     def setup_method(self, method):
@@ -542,8 +546,11 @@
 class AppTestOpcodes:
 
     def setup_class(cls):
+        try:
+            cls.space = gettestobjspace(usemodules=('_locale',))
+        except Skipped:
+            cls.space = gettestobjspace(usemodules=('_rawffi',))
         # This imports support_test_sre as the global "s"
-        cls.space = gettestobjspace(usemodules=('_locale',))
         init_globals_hack(cls.space)
 
     def test_length_optimization(self):



More information about the Pypy-commit mailing list