MCPcopy
hub / github.com/django/django / test_module_no_spec

Method test_module_no_spec

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

Source from the content-addressed store, hash-verified

276 @mock.patch("sys.warnoptions", [])
277 @mock.patch("sys._xoptions", {})
278 def test_module_no_spec(self):
279 module = types.ModuleType("test_module")
280 del module.__spec__
281 with mock.patch.dict(sys.modules, {"__main__": module}):
282 self.assertEqual(
283 autoreload.get_child_arguments(),
284 [sys.executable, __file__, "runserver"],
285 )
286
287
288class TestUtilities(SimpleTestCase):

Callers

nothing calls this directly

Calls 1

dictMethod · 0.80

Tested by

no test coverage detected