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