(self)
| 597 | self.assertEqual(f.mode, "wb") |
| 598 | |
| 599 | def test_init_with_x_mode(self): |
| 600 | self.addCleanup(unlink, TESTFN) |
| 601 | for mode in ("x", "xb"): |
| 602 | unlink(TESTFN) |
| 603 | with LZMAFile(TESTFN, mode) as f: |
| 604 | self.assertIsInstance(f, LZMAFile) |
| 605 | self.assertEqual(f.mode, 'wb') |
| 606 | with self.assertRaises(FileExistsError): |
| 607 | LZMAFile(TESTFN, mode) |
| 608 | |
| 609 | def test_init_bad_mode(self): |
| 610 | with self.assertRaises(ValueError): |
nothing calls this directly
no test coverage detected