diff options
author | Michael Hrivnak <mhrivnak@hrivnak.org> | 2014-03-08 01:44:53 -0500 |
---|---|---|
committer | Raphaƫl Barrois <raphael.barrois@polytechnique.org> | 2014-03-16 20:23:37 +0100 |
commit | 5688677a89f6d8f0168290ca069e473c15b7617c (patch) | |
tree | 1669d6c7e586b2c4a2cc3a9d234b648c1b344b8c /tests/test_django.py | |
parent | b37206c0155ffa0d853d9a38fc5b9ba3ba4c8b73 (diff) | |
download | semantic-version-5688677a89f6d8f0168290ca069e473c15b7617c.tar.gz |
moved django test app settings to the django test app module
... to guarantee the settings get executed before any code in that app. Since
python's unittest.TestLoader does not guarantee in what order it will import
modules while hunting for test cases, the unit tests could fail to even load if
tests.django_test_app.models was loaded before tests.test_django. This failure
was seen on ARM machines, which happened to traverse the module tree in an
inconvenient order.
Diffstat (limited to 'tests/test_django.py')
-rw-r--r-- | tests/test_django.py | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/tests/test_django.py b/tests/test_django.py index 0cb480b..35193fa 100644 --- a/tests/test_django.py +++ b/tests/test_django.py @@ -18,18 +18,6 @@ except ImportError: # pragma: no cover django_loaded = False if django_loaded: # pragma: no cover - if not settings.configured: - settings.configure( - DATABASES={ - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': 'tests/db/test.sqlite', - } - }, - INSTALLED_APPS=[ - 'tests.django_test_app', - ] - ) from .django_test_app import models from django.core import serializers |