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