(self)
| 1241 | unlink(TESTFN) |
| 1242 | |
| 1243 | def test_write_bad_args(self): |
| 1244 | f = LZMAFile(BytesIO(), "w") |
| 1245 | f.close() |
| 1246 | self.assertRaises(ValueError, f.write, b"foo") |
| 1247 | with LZMAFile(BytesIO(COMPRESSED_XZ), "r") as f: |
| 1248 | self.assertRaises(ValueError, f.write, b"bar") |
| 1249 | with LZMAFile(BytesIO(), "w") as f: |
| 1250 | self.assertRaises(TypeError, f.write, None) |
| 1251 | self.assertRaises(TypeError, f.write, "text") |
| 1252 | self.assertRaises(TypeError, f.write, 789) |
| 1253 | |
| 1254 | def test_writelines(self): |
| 1255 | with BytesIO(INPUT) as f: |
nothing calls this directly
no test coverage detected