MCPcopy
hub / github.com/django/django / test_no_file

Method test_no_file

tests/deprecation/tests.py:19–29  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

17 self.addCleanup(django_file_prefixes.cache_clear)
18
19 def test_no_file(self):
20 orig_file = django.__file__
21 try:
22 # Depending on the cwd, Python might give a local checkout
23 # precedence over installed Django, producing None.
24 django.__file__ = None
25 self.assertEqual(django_file_prefixes(), ())
26 del django.__file__
27 self.assertEqual(django_file_prefixes(), ())
28 finally:
29 django.__file__ = orig_file
30
31 def test_with_file(self):
32 prefixes = django_file_prefixes()

Callers

nothing calls this directly

Calls 1

django_file_prefixesFunction · 0.90

Tested by

no test coverage detected