Yields a stream that is valid tar data of size n_bytes.
(self, n_bytes)
| 140 | |
| 141 | @contextlib.contextmanager |
| 142 | def dummy_tar_stream(self, n_bytes): |
| 143 | '''Yields a stream that is valid tar data of size n_bytes.''' |
| 144 | with tempfile.NamedTemporaryFile() as tar_file: |
| 145 | self.write_dummy_tar_content(n_bytes, tar_file) |
| 146 | tar_file.seek(0) |
| 147 | yield tar_file |
| 148 | |
| 149 | @contextlib.contextmanager |
| 150 | def dummy_tar_file(self, n_bytes): |
no test coverage detected