1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

[1.8.x] 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

Backport of c0cc8f69e7 from master
This commit is contained in:
Tim Graham
2015-02-03 18:02:59 -05:00
parent cbcf92e95f
commit 3e24ab6f4c
6 changed files with 6 additions and 4 deletions

View File

@@ -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):