MCPcopy
hub / github.com/django/django / test_file_added

Method test_file_added

tests/utils_tests/test_autoreload.py:76–86  ·  view source on GitHub ↗

When a file is added, it's returned by iter_all_python_module_files().

(self)

Source from the content-addressed store, hash-verified

74 self.assertIsInstance(filename, Path)
75
76 def test_file_added(self):
77 """
78 When a file is added, it's returned by iter_all_python_module_files().
79 """
80 filename = self.temporary_file("test_deleted_removed_module.py")
81 filename.touch()
82
83 with extend_sys_path(str(filename.parent)):
84 self.import_and_cleanup("test_deleted_removed_module")
85
86 self.assertFileFound(filename.absolute())
87
88 def test_check_errors(self):
89 """

Callers

nothing calls this directly

Calls 5

temporary_fileMethod · 0.95
import_and_cleanupMethod · 0.95
assertFileFoundMethod · 0.95
extend_sys_pathFunction · 0.90
touchMethod · 0.45

Tested by

no test coverage detected