[pypy-commit] pypy default: use the array module only in test_arraymodule, else the other tests start failing for obscure reasons

antocuni noreply at buildbot.pypy.org
Thu Mar 22 21:07:39 CET 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: 
Changeset: r53926:a493491d7aad
Date: 2012-03-22 20:57 +0100
http://bitbucket.org/pypy/pypy/changeset/a493491d7aad/

Log:	use the array module only in test_arraymodule, else the other tests
	start failing for obscure reasons

diff --git a/pypy/module/cpyext/test/test_arraymodule.py b/pypy/module/cpyext/test/test_arraymodule.py
--- a/pypy/module/cpyext/test/test_arraymodule.py
+++ b/pypy/module/cpyext/test/test_arraymodule.py
@@ -1,3 +1,4 @@
+from pypy.conftest import gettestobjspace
 from pypy.module.cpyext.test.test_cpyext import AppTestCpythonExtensionBase
 
 import py
@@ -5,6 +6,7 @@
 
 class AppTestArrayModule(AppTestCpythonExtensionBase):
     enable_leak_checking = False
+    extra_modules = ['array']
 
     def test_basic(self):
         module = self.import_module(name='array')
diff --git a/pypy/module/cpyext/test/test_cpyext.py b/pypy/module/cpyext/test/test_cpyext.py
--- a/pypy/module/cpyext/test/test_cpyext.py
+++ b/pypy/module/cpyext/test/test_cpyext.py
@@ -165,8 +165,11 @@
         return leaking
 
 class AppTestCpythonExtensionBase(LeakCheckingTest):
+    extra_modules = []
+    
     def setup_class(cls):
-        cls.space = gettestobjspace(usemodules=['cpyext', 'thread', '_rawffi', 'array'])
+        cls.space = gettestobjspace(usemodules=['cpyext', 'thread', '_rawffi'] +
+                                               cls.extra_modules)
         cls.space.getbuiltinmodule("cpyext")
         from pypy.module.imp.importing import importhook
         importhook(cls.space, "os") # warm up reference counts


More information about the pypy-commit mailing list