From: David C. <da...@ar...> - 2006-10-19 10:26:09
|
Hi, 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): try: 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, cheers, David |