(self)
| 537 | class FileTestCase(unittest.TestCase): |
| 538 | |
| 539 | def test_init(self): |
| 540 | with LZMAFile(BytesIO(COMPRESSED_XZ)) as f: |
| 541 | self.assertIsInstance(f, LZMAFile) |
| 542 | self.assertEqual(f.mode, "rb") |
| 543 | with LZMAFile(BytesIO(), "w") as f: |
| 544 | self.assertIsInstance(f, LZMAFile) |
| 545 | self.assertEqual(f.mode, "wb") |
| 546 | with LZMAFile(BytesIO(), "x") as f: |
| 547 | self.assertIsInstance(f, LZMAFile) |
| 548 | self.assertEqual(f.mode, "wb") |
| 549 | with LZMAFile(BytesIO(), "a") as f: |
| 550 | self.assertIsInstance(f, LZMAFile) |
| 551 | self.assertEqual(f.mode, "wb") |
| 552 | |
| 553 | def test_init_with_PathLike_filename(self): |
| 554 | filename = FakePath(TESTFN) |
nothing calls this directly
no test coverage detected