(tmpdir)
| 1721 | |
| 1722 | |
| 1723 | def test_compressed_output_bz2(tmpdir): |
| 1724 | data = b"some test data\n" * 10 + b"eof\n" |
| 1725 | fn = str(tmpdir / "compressed_output_test.bz2") |
| 1726 | try: |
| 1727 | make_compressed_output(data, fn, "bz2") |
| 1728 | except NotImplementedError as e: |
| 1729 | pytest.skip(str(e)) |
| 1730 | with bz2.BZ2File(fn, "r") as f: |
| 1731 | got = f.read() |
| 1732 | assert got == data |
| 1733 | |
| 1734 | |
| 1735 | def test_output_stream_constructor(tmpdir): |
nothing calls this directly
no test coverage detected