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

Method _test_files

Lib/test/test_importlib/metadata/test_api.py:172–182  ·  view source on GitHub ↗
(files)

Source from the content-addressed store, hash-verified

170
171 @staticmethod
172 def _test_files(files):
173 root = files[0].root
174 for file in files:
175 assert file.root == root
176 assert not file.hash or file.hash.value
177 assert not file.hash or file.hash.mode == 'sha256'
178 assert not file.size or file.size >= 0
179 assert file.locate().exists()
180 assert isinstance(file.read_binary(), bytes)
181 if file.name.endswith('.py'):
182 file.read_text()
183
184 def test_file_hash_repr(self):
185 util = [p for p in files('distinfo-pkg') if p.name == 'mod.py'][0]

Callers 2

test_files_dist_infoMethod · 0.95
test_files_egg_infoMethod · 0.95

Calls 5

locateMethod · 0.80
read_binaryMethod · 0.80
existsMethod · 0.45
endswithMethod · 0.45
read_textMethod · 0.45

Tested by

no test coverage detected