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

Method _test_files

Lib/test/test_importlib/test_metadata_api.py:178–188  ·  view source on GitHub ↗
(files)

Source from the content-addressed store, hash-verified

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