(self)
| 659 | |
| 660 | @unittest.expectedFailure # TODO: RUSTPYTHON; OverflowError: Python int too large to convert to Rust u32 |
| 661 | def test_init_bad_preset(self): |
| 662 | with self.assertRaises(TypeError): |
| 663 | LZMAFile(BytesIO(), "w", preset=4.39) |
| 664 | with self.assertRaises(LZMAError): |
| 665 | LZMAFile(BytesIO(), "w", preset=10) |
| 666 | with self.assertRaises(LZMAError): |
| 667 | LZMAFile(BytesIO(), "w", preset=23) |
| 668 | with self.assertRaises(ValueError): |
| 669 | LZMAFile(BytesIO(), "w", preset=-1) |
| 670 | with self.assertRaises(ValueError): |
| 671 | LZMAFile(BytesIO(), "w", preset=-7) |
| 672 | with self.assertRaises(OverflowError): |
| 673 | LZMAFile(BytesIO(), "w", preset=2**1000) |
| 674 | with self.assertRaises(TypeError): |
| 675 | LZMAFile(BytesIO(), "w", preset="foo") |
| 676 | # Cannot specify a preset with mode="r". |
| 677 | with self.assertRaises(ValueError): |
| 678 | LZMAFile(BytesIO(COMPRESSED_XZ), preset=3) |
| 679 | |
| 680 | @unittest.expectedFailure # TODO: RUSTPYTHON; lzma.LZMAError: Failed to initialize encoder |
| 681 | def test_init_bad_filter_spec(self): |
nothing calls this directly
no test coverage detected