Python nosetests runs tests twice

898 views Asked by At

I'm setting up a Python Continuous Integration server, using Jenkins, and nosetests keeps running the same tests twice. I'm not importing the tests anywhere. Here's the command I'm running:

nosetests --with-xcoverage --with-xunit --all-modules --traverse-namespace --cover-package=app --cover-inclusive --cover-erase -x

Any ideas? It's a Flask-Restful app.

2

There are 2 answers

0
Danimal On

I had a similar issue. After turning up verbosity (as suggested by Schollii above) and comparing notes on this question what worked for me was deleting the init.py (and init.pyc of course) in my main code folder (of which tests were a subdirectory).

0
d33tah On

I just had this one. Apparently I messed up the command line syntax. It's not:

nosetests module.py module.class_name

It's:

nosetests module.class_name