[pypy-commit] pypy default: Skip these tests in py.test -A.

arigo noreply at buildbot.pypy.org
Sat Dec 10 12:13:24 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r50337:386488dbe96d
Date: 2011-12-10 11:12 +0000
http://bitbucket.org/pypy/pypy/changeset/386488dbe96d/

Log:	Skip these tests in py.test -A.

diff --git a/pypy/module/imp/test/test_import.py b/pypy/module/imp/test/test_import.py
--- a/pypy/module/imp/test/test_import.py
+++ b/pypy/module/imp/test/test_import.py
@@ -150,6 +150,7 @@
 
     def setup_class(cls): # interpreter-level
         cls.space = gettestobjspace(usemodules=['itertools'])
+        cls.w_runappdirect = cls.space.wrap(conftest.option.runappdirect)
         cls.saved_modules = _setup(cls.space)
         #XXX Compile class
 
@@ -575,6 +576,7 @@
             assert False, 'should not work'
 
     def test_shadow_builtin(self):
+        if self.runappdirect: skip("hard to test: module is already imported")
         # 'import gc' is supposed to always find the built-in module;
         # like CPython, it is a built-in module, so it shadows everything,
         # even though there is a gc.py.
@@ -586,6 +588,7 @@
         del sys.modules['gc']
 
     def test_shadow_extension_1(self):
+        if self.runappdirect: skip("hard to test: module is already imported")
         # 'import itertools' is supposed to find itertools.py if there is
         # one in sys.path.
         import sys
@@ -597,6 +600,7 @@
         del sys.modules['itertools']
 
     def test_shadow_extension_2(self):
+        if self.runappdirect: skip("hard to test: module is already imported")
         # 'import itertools' is supposed to find the built-in module even
         # if there is also one in sys.path as long as it is *after* the
         # special entry '.../lib_pypy/__extensions__'.  (Note that for now


More information about the pypy-commit mailing list