Skip to content

Commit 7036a65

Browse files
authored
Update test_lzma.py
1 parent 29db7f0 commit 7036a65

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

Lib/test/test_lzma.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -539,16 +539,12 @@ class FileTestCase(unittest.TestCase):
539539
def test_init(self):
540540
with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
541541
self.assertIsInstance(f, LZMAFile)
542-
self.assertEqual(f.mode, "rb")
543542
with LZMAFile(BytesIO(), "w") as f:
544543
self.assertIsInstance(f, LZMAFile)
545-
self.assertEqual(f.mode, "wb")
546544
with LZMAFile(BytesIO(), "x") as f:
547545
self.assertIsInstance(f, LZMAFile)
548-
self.assertEqual(f.mode, "wb")
549546
with LZMAFile(BytesIO(), "a") as f:
550547
self.assertIsInstance(f, LZMAFile)
551-
self.assertEqual(f.mode, "wb")
552548

553549
def test_init_with_PathLike_filename(self):
554550
filename = FakePath(TESTFN)
@@ -573,30 +569,23 @@ def test_init_mode(self):
573569
with TempFile(TESTFN):
574570
with LZMAFile(TESTFN, "r") as f:
575571
self.assertIsInstance(f, LZMAFile)
576-
self.assertEqual(f.mode, "rb")
577572
with LZMAFile(TESTFN, "rb") as f:
578573
self.assertIsInstance(f, LZMAFile)
579-
self.assertEqual(f.mode, "rb")
580574
with LZMAFile(TESTFN, "w") as f:
581575
self.assertIsInstance(f, LZMAFile)
582-
self.assertEqual(f.mode, "wb")
583576
with LZMAFile(TESTFN, "wb") as f:
584577
self.assertIsInstance(f, LZMAFile)
585-
self.assertEqual(f.mode, "wb")
586578
with LZMAFile(TESTFN, "a") as f:
587579
self.assertIsInstance(f, LZMAFile)
588-
self.assertEqual(f.mode, "wb")
589580
with LZMAFile(TESTFN, "ab") as f:
590581
self.assertIsInstance(f, LZMAFile)
591-
self.assertEqual(f.mode, "wb")
592582

593583
def test_init_with_x_mode(self):
594584
self.addCleanup(unlink, TESTFN)
595585
for mode in ("x", "xb"):
596586
unlink(TESTFN)
597587
with LZMAFile(TESTFN, mode) as f:
598588
self.assertIsInstance(f, LZMAFile)
599-
self.assertEqual(f.mode, 'wb')
600589
with self.assertRaises(FileExistsError):
601590
LZMAFile(TESTFN, mode)
602591

0 commit comments

Comments
 (0)