MCPcopy Index your code
hub / github.com/python/cpython / test_sys_path

Method test_sys_path

Lib/test/test_importlib/import_/test_path.py:29–38  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

27 self.assertIsNone(self.find(module))
28
29 def test_sys_path(self):
30 # Test that sys.path is used when 'path' is None.
31 # Implicitly tests that sys.path_importer_cache is used.
32 module = '<test module>'
33 path = '<test path>'
34 importer = util.mock_spec(module)
35 with util.import_state(path_importer_cache={path: importer},
36 path=[path]):
37 found = self.find(module)
38 self.check_found(found, importer)
39
40 def test_path(self):
41 # Test that 'path' is used when set.

Callers

nothing calls this directly

Calls 2

findMethod · 0.45
check_foundMethod · 0.45

Tested by

no test coverage detected