(self)
| 607 | LZMAFile(TESTFN, mode) |
| 608 | |
| 609 | def test_init_bad_mode(self): |
| 610 | with self.assertRaises(ValueError): |
| 611 | LZMAFile(BytesIO(COMPRESSED_XZ), (3, "x")) |
| 612 | with self.assertRaises(ValueError): |
| 613 | LZMAFile(BytesIO(COMPRESSED_XZ), "") |
| 614 | with self.assertRaises(ValueError): |
| 615 | LZMAFile(BytesIO(COMPRESSED_XZ), "xt") |
| 616 | with self.assertRaises(ValueError): |
| 617 | LZMAFile(BytesIO(COMPRESSED_XZ), "x+") |
| 618 | with self.assertRaises(ValueError): |
| 619 | LZMAFile(BytesIO(COMPRESSED_XZ), "rx") |
| 620 | with self.assertRaises(ValueError): |
| 621 | LZMAFile(BytesIO(COMPRESSED_XZ), "wx") |
| 622 | with self.assertRaises(ValueError): |
| 623 | LZMAFile(BytesIO(COMPRESSED_XZ), "rt") |
| 624 | with self.assertRaises(ValueError): |
| 625 | LZMAFile(BytesIO(COMPRESSED_XZ), "r+") |
| 626 | with self.assertRaises(ValueError): |
| 627 | LZMAFile(BytesIO(COMPRESSED_XZ), "wt") |
| 628 | with self.assertRaises(ValueError): |
| 629 | LZMAFile(BytesIO(COMPRESSED_XZ), "w+") |
| 630 | with self.assertRaises(ValueError): |
| 631 | LZMAFile(BytesIO(COMPRESSED_XZ), "rw") |
| 632 | |
| 633 | def test_init_bad_check(self): |
| 634 | with self.assertRaises(TypeError): |
nothing calls this directly
no test coverage detected