(files)
| 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] |
no test coverage detected