MCPcopy
hub / github.com/django/django / test_ignores_non_cache_files

Method test_ignores_non_cache_files

tests/cache/tests.py:1815–1823  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1813 return tempfile.mkdtemp()
1814
1815 def test_ignores_non_cache_files(self):
1816 fname = os.path.join(self.dirname, "not-a-cache-file")
1817 with open(fname, "w"):
1818 os.utime(fname, None)
1819 cache.clear()
1820 self.assertTrue(
1821 os.path.exists(fname), "Expected cache.clear to ignore non cache files"
1822 )
1823 os.remove(fname)
1824
1825 def test_clear_does_not_remove_cache_dir(self):
1826 cache.clear()

Callers

nothing calls this directly

Calls 4

joinMethod · 0.45
clearMethod · 0.45
existsMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected