diff options
author | Tim Graham <timograham@gmail.com> | 2015-02-03 18:02:59 -0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2015-02-03 18:30:46 -0500 |
commit | c0cc8f69e7abfa8578729031f97ae4b96c5cdafe (patch) | |
tree | 7d8530b7e682abda046cbd7015816d1cb5c19b24 /tests/apps | |
parent | 65e005f8cd9c656e558e53e6c8b890cd0fcc9e74 (diff) | |
download | django-c0cc8f69e7abfa8578729031f97ae4b96c5cdafe.tar.gz |
Refactored tests that rely on an ImportError for Python 3.5 compatibility
A change in Python test discovery [1] causes the old packages that raised
an error to be discovered; now we use a common directory that's
ignored during discovery. Refs #23763.
[1] http://bugs.python.org/issue7559
Diffstat (limited to 'tests/apps')
-rw-r--r-- | tests/apps/failing_app/__init__.py | 1 | ||||
-rw-r--r-- | tests/apps/tests.py | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/tests/apps/failing_app/__init__.py b/tests/apps/failing_app/__init__.py deleted file mode 100644 index 4ec7f18d40..0000000000 --- a/tests/apps/failing_app/__init__.py +++ /dev/null @@ -1 +0,0 @@ -raise ImportError("Oops") diff --git a/tests/apps/tests.py b/tests/apps/tests.py index f6bef17e42..b7652ed355 100644 --- a/tests/apps/tests.py +++ b/tests/apps/tests.py @@ -172,7 +172,7 @@ class AppsTests(TestCase): App discovery should preserve stack traces. Regression test for #22920. """ with six.assertRaisesRegex(self, ImportError, "Oops"): - with self.settings(INSTALLED_APPS=['apps.failing_app']): + with self.settings(INSTALLED_APPS=['import_error_package']): pass def test_models_py(self): |