(self)
| 1877 | self.assertRaises(ValueError, f.writable) |
| 1878 | |
| 1879 | def test_read_0(self): |
| 1880 | with ZstdFile(io.BytesIO(COMPRESSED_100_PLUS_32KB)) as f: |
| 1881 | self.assertEqual(f.read(0), b"") |
| 1882 | self.assertEqual(f.read(), DECOMPRESSED_100_PLUS_32KB) |
| 1883 | with ZstdFile(io.BytesIO(COMPRESSED_100_PLUS_32KB), |
| 1884 | options={DecompressionParameter.window_log_max:20}) as f: |
| 1885 | self.assertEqual(f.read(0), b"") |
| 1886 | |
| 1887 | # empty file |
| 1888 | with ZstdFile(io.BytesIO(b'')) as f: |
| 1889 | self.assertEqual(f.read(0), b"") |
| 1890 | with self.assertRaises(EOFError): |
| 1891 | f.read(10) |
| 1892 | |
| 1893 | with ZstdFile(io.BytesIO(b'')) as f: |
| 1894 | with self.assertRaises(EOFError): |
| 1895 | f.read(10) |
| 1896 | |
| 1897 | def test_read_10(self): |
| 1898 | with ZstdFile(io.BytesIO(COMPRESSED_100_PLUS_32KB)) as f: |
nothing calls this directly
no test coverage detected