根据the docs,我可以像这样运行django.contrib.admin的测试
# from django/tests
./runtests.py --settings=test_sqlite django.contrib.admin
然而,当我这样做时,我收到了这个错误:
Traceback (most recent call last):
File "./runtests.py", line 337, in <module>
options.failfast, args)
File "./runtests.py", line 180, in django_tests
failures = test_runner.run_tests(test_labels, extra_tests=extra_tests)
File "/Users/joshuafialkoff/.virtualenvs/bankr-env/src/django/django/test/simple.py", line 369, in run_tests
suite = self.build_suite(test_labels, extra_tests)
File "/Users/joshuafialkoff/.virtualenvs/bankr-env/src/django/django/test/simple.py", line 254, in build_suite
suite.addTest(build_test(label))
File "/Users/joshuafialkoff/.virtualenvs/bankr-env/src/django/django/test/simple.py", line 102, in build_test
app_module = get_app(parts[0])
File "/Users/joshuafialkoff/.virtualenvs/bankr-env/src/django/django/db/models/loading.py", line 160, in get_app
raise ImproperlyConfigured("App with label %s could not be found" % app_label)
django.core.exceptions.ImproperlyConfigured: App with label django could not be found
与此同时,如果我跑:
./runtests.py --settings=test_sqlite
测试开始运行 - 但我不想运行整个套件。我是从repo标签1.5.2运行的。我如何为管理员运行测试?