MCPcopy Create free account
hub / github.com/python/cpython / _fixture_on_path

Method _fixture_on_path

Lib/test/test_importlib/metadata/fixtures.py:362–367  ·  view source on GitHub ↗
(self, filename)

Source from the content-addressed store, hash-verified

360 root = 'test.test_importlib.metadata.data'
361
362 def _fixture_on_path(self, filename):
363 pkg_file = resources.files(self.root).joinpath(filename)
364 file = self.resources.enter_context(resources.as_file(pkg_file))
365 assert file.name.startswith('example'), file.name
366 sys.path.insert(0, str(file))
367 self.resources.callback(sys.path.pop, 0)
368
369 def setUp(self):
370 # Add self.zip_name to the front of sys.path.

Callers 4

setUpMethod · 0.80
setUpMethod · 0.80

Calls 7

strFunction · 0.85
enter_contextMethod · 0.80
joinpathMethod · 0.45
filesMethod · 0.45
startswithMethod · 0.45
insertMethod · 0.45
callbackMethod · 0.45

Tested by 4

setUpMethod · 0.64
setUpMethod · 0.64