(self)
| 1022 | self.assertRaises(TypeError, f.read1, None) |
| 1023 | |
| 1024 | def test_peek(self): |
| 1025 | with LZMAFile(BytesIO(COMPRESSED_XZ)) as f: |
| 1026 | result = f.peek() |
| 1027 | self.assertGreater(len(result), 0) |
| 1028 | self.assertStartsWith(INPUT, result) |
| 1029 | self.assertEqual(f.read(), INPUT) |
| 1030 | with LZMAFile(BytesIO(COMPRESSED_XZ)) as f: |
| 1031 | result = f.peek(10) |
| 1032 | self.assertGreater(len(result), 0) |
| 1033 | self.assertStartsWith(INPUT, result) |
| 1034 | self.assertEqual(f.read(), INPUT) |
| 1035 | |
| 1036 | def test_peek_bad_args(self): |
| 1037 | with LZMAFile(BytesIO(), "w") as f: |
nothing calls this directly
no test coverage detected