(self)
| 603 | self.assertEqual(f.mode, "wb") |
| 604 | |
| 605 | def test_init_with_x_mode(self): |
| 606 | self.addCleanup(unlink, TESTFN) |
| 607 | for mode in ("x", "xb"): |
| 608 | unlink(TESTFN) |
| 609 | with LZMAFile(TESTFN, mode) as f: |
| 610 | self.assertIsInstance(f, LZMAFile) |
| 611 | self.assertEqual(f.mode, 'wb') |
| 612 | with self.assertRaises(FileExistsError): |
| 613 | LZMAFile(TESTFN, mode) |
| 614 | |
| 615 | def test_init_bad_mode(self): |
| 616 | with self.assertRaises(ValueError): |
nothing calls this directly
no test coverage detected