I am working on a tdd project in python and I am looking for a quick way to run all unit tests in my t/ directory. In perl this is easy:
$ prove -lvr t/
I am looking for the python equivalent. It does not seem that nose has this functionality. I rolled a command line statement to do something like this:
for x in `find t/ | grep py`; do echo $x && python $x ; done
But this lacks flags like -l (include the local lib dir) and -v (verbose). Does this or does this not exist in python? I want a one liner like this:
$ pyprove -lvr t/
You can do this by running python -m unittest discover -s t/, which will discover your unit tests and run them for you. It looks like there's a verbose flag, but I don't see a flag to include the local lib dir.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With