(self)
| 1251 | unlink(TESTFN) |
| 1252 | |
| 1253 | def test_write_bad_args(self): |
| 1254 | f = LZMAFile(BytesIO(), "w") |
| 1255 | f.close() |
| 1256 | self.assertRaises(ValueError, f.write, b"foo") |
| 1257 | with LZMAFile(BytesIO(COMPRESSED_XZ), "r") as f: |
| 1258 | self.assertRaises(ValueError, f.write, b"bar") |
| 1259 | with LZMAFile(BytesIO(), "w") as f: |
| 1260 | self.assertRaises(TypeError, f.write, None) |
| 1261 | self.assertRaises(TypeError, f.write, "text") |
| 1262 | self.assertRaises(TypeError, f.write, 789) |
| 1263 | |
| 1264 | def test_writelines(self): |
| 1265 | with BytesIO(INPUT) as f: |
nothing calls this directly
no test coverage detected