[英]How to run specific tests with django-admin.py?
I have an app located at app/
and tests which reside at app/tests/tests.py
. 我有一个位于
app/
的应用app/
和位于app/tests/tests.py
。 How can I run those tests with django-admin.py
? 如何使用
django-admin.py
运行这些测试?
I tried django-admin.py test app
, django-admin.py test app.tests
and django-admin.py test app.tests.tests
but with no success. 我尝试了
django-admin.py test app
, django-admin.py test app.tests
和django-admin.py test app.tests.tests
但没有成功。
I add that I am also adding the --settings
param to the above commands but cut it off for readability. 我补充说,我还在上面的命令中添加了
--settings
参数,但为了便于阅读而将其删除。
You need to use manage.py
instead on django-admin.py
. 您需要在
django-admin.py
上使用manage.py
。 So run ./manage.py test app
所以运行
./manage.py test app
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.