(self)
| 2546 | self.assertEqual(file_data.replace(os.linesep, "\n"), uncompressed * 2) |
| 2547 | |
| 2548 | def test_bad_params(self): |
| 2549 | with tempfile.NamedTemporaryFile(delete=False) as tmp_f: |
| 2550 | TESTFN = pathlib.Path(tmp_f.name) |
| 2551 | |
| 2552 | with self.assertRaises(ValueError): |
| 2553 | open(TESTFN, "") |
| 2554 | with self.assertRaises(ValueError): |
| 2555 | open(TESTFN, "rbt") |
| 2556 | with self.assertRaises(ValueError): |
| 2557 | open(TESTFN, "rb", encoding="utf-8") |
| 2558 | with self.assertRaises(ValueError): |
| 2559 | open(TESTFN, "rb", errors="ignore") |
| 2560 | with self.assertRaises(ValueError): |
| 2561 | open(TESTFN, "rb", newline="\n") |
| 2562 | |
| 2563 | os.remove(TESTFN) |
| 2564 | |
| 2565 | def test_option(self): |
| 2566 | options = {DecompressionParameter.window_log_max:25} |
nothing calls this directly
no test coverage detected