[py-dev] py.test and --session, re-run failures only
Martin Blais
martin.blais at gmail.com
Fri Apr 1 04:23:08 MEST 2005
hi guys
my first post on this list. thanks for py.test, it's very nice, i'm
in the process of converting my cr*ppy unittest hacks into something a
little cleaner by using py.test. in the past, i wrote some testing
infrastructure for a large C++ project in the past, i hope i can
contribute something to this project in the future.
1.
so i'm checking out py.test and i run across this:
--session run a test session/rerun only failing tests.
"rerun only failing tests" lets me think that somehow the session is
recording somewhere (e.g. in a file) which tests have failed and only
reruns those tests. in fact, fiddling in the code and running it, i
realized that it just runs a subprocess and monitors file changes (by
polling), and then automatically reruns the tests. perhaps the help
string should be clarified.
in any case, it would be a cool feature to be able to record which
tests fail and then to be able to rerun just the ones which failed in
the past. we used to have that in my previous job, and it was very
useful, we had LOTS of tests, and running them was very slow, so just
rerunniing the failures was a great timesaver.
2.
i would like to be able to say "run just this one test", by specifying
the method, e.g. test_search.py:TestSearch.test_simple, or perhaps
some kind simpler pattern matching. this is why i started fiddling in
the code.
i would probably modify the driver to filter down the wanted methods
once the collector has passed. any comments on how to go about this
welcome.
thanks,
cheers,
More information about the py-dev
mailing list