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

Method test_path

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

Source from the content-addressed store, hash-verified

38 self.check_found(found, importer)
39
40 def test_path(self):
41 # Test that 'path' is used when set.
42 # Implicitly tests that sys.path_importer_cache is used.
43 module = '<test module>'
44 path = '<test path>'
45 importer = util.mock_spec(module)
46 with util.import_state(path_importer_cache={path: importer}):
47 found = self.find(module, [path])
48 self.check_found(found, importer)
49
50 def test_empty_list(self):
51 # An empty list should not count as asking for sys.path.

Callers

nothing calls this directly

Calls 2

findMethod · 0.45
check_foundMethod · 0.45

Tested by

no test coverage detected