MCPcopy
hub / github.com/django/django / test_exe_fallback

Method test_exe_fallback

tests/utils_tests/test_autoreload.py:232–239  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

230 @mock.patch("__main__.__spec__", None)
231 @mock.patch("sys.warnoptions", [])
232 def test_exe_fallback(self):
233 with tempfile.TemporaryDirectory() as tmpdir:
234 exe_path = Path(tmpdir) / "django-admin.exe"
235 exe_path.touch()
236 with mock.patch("sys.argv", [exe_path.with_suffix(""), "runserver"]):
237 self.assertEqual(
238 autoreload.get_child_arguments(), [exe_path, "runserver"]
239 )
240
241 @mock.patch("sys.warnoptions", [])
242 @mock.patch.dict(sys.modules, {"__main__": django.__main__})

Callers

nothing calls this directly

Calls 2

touchMethod · 0.45
patchMethod · 0.45

Tested by

no test coverage detected