I have all of my TestCase
files in a django app called 'tests'. Running a specific TestCase
works just fine with this command:
python run manage.py test tests.myTestCaseFile
However, when i run the entire set of TestCases in the tests folder this fails:
python run manage.py test tests
In this case many ImportErrors are triggered as well as KeyError: 'en-us'. Essentially every single TestMethod
errors out in one way or another.
Any ideas what could be happening here?
NOTE: I have already tried to import myapp.urls in the shell and reverse(urlname) works just fine there..
I've solved this issue:
I had a test file which was testing functionality that did not exist in the current branch.
Seems that an import error in any test file prevents execution of the entire test suite.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.