MCPcopy Index your code
hub / github.com/RustPython/RustPython / _test_files

Method _test_files

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

Source from the content-addressed store, hash-verified

177
178 @staticmethod
179 def _test_files(files):
180 root = files[0].root
181 for file in files:
182 assert file.root == root
183 assert not file.hash or file.hash.value
184 assert not file.hash or file.hash.mode == 'sha256'
185 assert not file.size or file.size >= 0
186 assert file.locate().exists()
187 assert isinstance(file.read_binary(), bytes)
188 if file.name.endswith('.py'):
189 file.read_text()
190
191 def test_file_hash_repr(self):
192 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 6

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

Tested by

no test coverage detected