summaryrefslogtreecommitdiff
path: root/tests/deprecation/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/deprecation/tests.py')
-rw-r--r--tests/deprecation/tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/deprecation/tests.py b/tests/deprecation/tests.py
index 2df9cc6fa2..ac610b4928 100644
--- a/tests/deprecation/tests.py
+++ b/tests/deprecation/tests.py
@@ -18,6 +18,10 @@ class DjangoFilePrefixesTests(SimpleTestCase):
def test_no_file(self):
orig_file = django.__file__
try:
+ # Depending on the cwd, Python might give a local checkout
+ # precedence over installed Django, producing None.
+ django.__file__ = None
+ self.assertEqual(django_file_prefixes(), ())
del django.__file__
self.assertEqual(django_file_prefixes(), ())
finally: