summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2014-01-18 19:01:13 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2014-01-18 23:06:00 +0100
commit74d8fdcfa6a49cb30210c690dff08fc62b642e2a (patch)
tree3894476e44c7b655f785a739be3fe789ed003d0c
parent4dc3be250662b4132d8475fb02983a6d8f1eec23 (diff)
Stopped assuming that INSTALLED_APPS only contains app names.
While this assumption is true for the time being, it makes the code needlessly brittle.
-rwxr-xr-xtests/runtests.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/runtests.py b/tests/runtests.py
index dcd9c885bd..8009136ac3 100755
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -167,11 +167,12 @@ def setup(verbosity, test_labels):
module_label == label or module_label.startswith(label + '.')
for label in test_labels_set)
+ installed_app_names = set(get_installed())
if module_found_in_labels:
if verbosity >= 2:
print("Importing application %s" % module_name)
# HACK.
- if module_label not in settings.INSTALLED_APPS:
+ if module_label not in installed_app_names:
settings.INSTALLED_APPS.append(module_label)
app_config = AppConfig.create(module_label)
apps.app_configs[app_config.label] = app_config