[TIP] getting access to the discovered test list
Titus Brown
titus at caltech.edu
Wed Feb 28 15:30:28 PST 2007
-> One of the features I was adding to our custom test runner required me
-> building a list of all tests. I had created my own test loader that made a
-> copy of the found TestCase objects.
->
-> Is there a way for me to access the test list within nose?
->
-> Asking here because I haven't started reading the source and I know you guys
-> are regular nose users :)
Hi, Bear,
one thing you might try (and it's a hack) is to use the pinocchio
'outputsave' option. Grab & install the latest version of pinocchio,
easy_install http://darcs.idyll.org/~t/projects/pinocchio-latest.tar.gz
and then do
nosetests --with-outputsave
This will create a bunch of files named 'success-<testname>', one for
each test. This will save you writing a plugin to do it yourself.
There's probably a much easier way of doing it but I don't have a good
memory for the nose command line options.
cheers,
--titus
More information about the testing-in-python
mailing list