I'm trying to write a task for Paver
that will run nosetests
on my files.
My directory structure looks like this:
project/
file1.py
file2.py
file3.py
build/
pavement.py
subproject/
file4.py
test/
file5.py
file6.py
Doctests (using the --with_doctest
option) should be run on all the *.py files, while only the files under project/test
(in this example, file5.py
and file6.py
) should be searched for test routines.
I can't seem to figure out how to do this--I can write a custom plugin for nose
which includes the correct files, but I can't seem to get paver
to build and install it before calling the nosetests
task. I also can't find a way to get paver
to pass a list of files to test to nosetests
on the command line.
What's the best way of getting this to work?
Is this at all close to what you're trying to get at?
I'm not actually sure how to tell nose to look in specific files, but that's a matter of command-line options.
--where
lets you specify a directory, but I don't see a way to say "run only doctests here, and other tests here". You may need two invocations ofsh('nosetests')
to do all that.