[SciPy-dev] WxPython required?
Mon Jan 21 04:12:15 CST 2008
> > I'm happy to try to import PIL and have nose skip the tests if PIL is not found;
> > however, this approach cannot be safely extended to wx. You might want to raise
> > SkipTest instead of assigning TestCase.__test__=False, though. That tells the
> > user that a test is being skipped and gives them a command line option to force
> > nosetests to run the test anyways.
Thanks - SkipTest does seem like the right thing to do.
> I was wondering if for things like GUI tests, we could use nosepipe:
Good pointer. The rule of thumb being that any test that imported wx
or other GUI thing would use nosepipe, and nosetests vanilla
otherwise. Things may start to get a bit complex though. First we've
got the extra dependency on nosepipe - minor. Then we've got the
question of whether we want to run all tests for one module through
nosepipe if only one test has GUI code - there's only one nosetests
call per module. The alternative, would be to decorate tests destined
for nosepipe, and have two test calls, one for the nosepipe tests, and
one for the non-nosepipe tests, as in:
nose.run(argv = ['', directory_name, '-A', 'not needpipe'])
nose.run(argv = ['', directory_name, '-A', 'needpipe',
This moves us further away from the simple
from the command line, but...
So - more functionality, less simplicity and transparency - the usual thing.
More information about the Scipy-dev