Conditional tests for test classes derived from NumpyTest

David Cournapeau david at
Thu Oct 19 05:25:52 CDT 2006


    Is there a simple way to execute tests inherited from NumpyTest 
conditionally ? I have something like that for now:

    class test_c_implementation(NumpyTestCase):
        def _check(self, level, decimal = 12):
                from foo import bar
                Y   = bar()
            except ImportError, inst:
                print "Error while importing bar, not tested"
                print " -> (Import error was %s)" % inst

    And all checking functions of the class call _check. The problem is 
that if there are 10 check functions, there are 10 errors reported, 
which is a bit stupid,



Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo

More information about the Numpy-discussion mailing list