Author: Timo Paulssen <[email protected]>
Branch: numpypy-issue1137
Changeset: r54812:54c62c649f89
Date: 2012-04-29 23:05 +0200
http://bitbucket.org/pypy/pypy/changeset/54c62c649f89/

Log:    the magic incantation to call the base classes setup_class has been
        found.

diff --git a/pypy/module/micronumpy/test/test_numarray.py 
b/pypy/module/micronumpy/test/test_numarray.py
--- a/pypy/module/micronumpy/test/test_numarray.py
+++ b/pypy/module/micronumpy/test/test_numarray.py
@@ -8,13 +8,6 @@
 from pypy.module.micronumpy.interp_numarray import W_NDimArray, shape_agreement
 from pypy.module.micronumpy.test.test_base import BaseNumpyAppTest
 
-# needed only for the verbatim copy of setup_class from test_base
-from pypy.conftest import gettestobjspace
-from pypy.module.micronumpy.interp_dtype import nonnative_byteorder_prefix,\
-     byteorder_prefix
-from pypy.conftest import option
-import sys
-
 class MockDtype(object):
     class itemtype(object):
         @staticmethod
@@ -202,16 +195,7 @@
 
 class AppTestNumArray(BaseNumpyAppTest):
     def setup_class(cls):
-        # this is a verbatim copy from test_base, because calling the base 
classes
-        # setup_class method doesn't seem to work at all.
-        if option.runappdirect:
-            if '__pypy__' not in sys.builtin_module_names:
-                import numpy
-                sys.modules['numpypy'] = numpy
-                sys.modules['_numpypy'] = numpy
-        cls.space = gettestobjspace(usemodules=['micronumpy'])
-        cls.w_non_native_prefix = cls.space.wrap(nonnative_byteorder_prefix)
-        cls.w_native_prefix = cls.space.wrap(byteorder_prefix)
+        BaseNumpyAppTest.setup_class.im_func(cls)
 
         w_tup = cls.space.appexec([], """():
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to