{{{
import sys
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'app.tests.settings'
from django.conf import settings
from django.test.utils import get_runner
if __name__ == '__main__':
from django import setup
setup()
TestRunner = get_runner(settings)
test_runner = TestRunner()
failures = test_runner.run_tests(settings.INSTALLED_APPS)
if failures:
sys.exit(bool(failures))
}}}
... and there is a typo in INSTALLED_APPS, instead of an ImportError
pointing towards the wrong app-name there's an AppRegistryNotReady.
This holds for both 1.8.7 and 1.9.
--
Ticket URL: <https://code.djangoproject.com/ticket/26004>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* needs_better_patch: => 0
* component: Uncategorized => Core (Other)
* needs_tests: => 0
* version: 1.9 => 1.8
* type: Uncategorized => Bug
* needs_docs: => 0
* resolution: => needsinfo
Comment:
I can't reproduce this given the details you provided. Could you provide a
sample project to reproduce it and reopen the ticket? Here's the traceback
I see:
{{{
Traceback (most recent call last):
File "runtests.py", line 11, in <module>
setup()
File "/home/tim/code/django/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/tim/code/django/django/apps/registry.py", line 85, in
populate
app_config = AppConfig.create(entry)
File "/home/tim/code/django/django/apps/config.py", line 86, in create
module = import_module(entry)
File
"/home/tim/.virtualenvs/django351/lib/python3.5/importlib/__init__.py",
line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 956, in
_find_and_load_unlocked
ImportError: No module named 'xxx'
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26004#comment:1>