@@ -538,13 +538,13 @@ class FileTestCase(unittest.TestCase):
538
538
539
539
def test_init (self ):
540
540
with LZMAFile (BytesIO (COMPRESSED_XZ )) as f :
541
- pass
541
+ self . assertIsInstance ( f , LZMAFile )
542
542
with LZMAFile (BytesIO (), "w" ) as f :
543
- pass
543
+ self . assertIsInstance ( f , LZMAFile )
544
544
with LZMAFile (BytesIO (), "x" ) as f :
545
- pass
545
+ self . assertIsInstance ( f , LZMAFile )
546
546
with LZMAFile (BytesIO (), "a" ) as f :
547
- pass
547
+ self . assertIsInstance ( f , LZMAFile )
548
548
549
549
def test_init_with_PathLike_filename (self ):
550
550
filename = FakePath (TESTFN )
@@ -567,25 +567,25 @@ def test_init_with_filename(self):
567
567
568
568
def test_init_mode (self ):
569
569
with TempFile (TESTFN ):
570
- with LZMAFile (TESTFN , "r" ):
571
- pass
572
- with LZMAFile (TESTFN , "rb" ):
573
- pass
574
- with LZMAFile (TESTFN , "w" ):
575
- pass
576
- with LZMAFile (TESTFN , "wb" ):
577
- pass
578
- with LZMAFile (TESTFN , "a" ):
579
- pass
580
- with LZMAFile (TESTFN , "ab" ):
581
- pass
570
+ with LZMAFile (TESTFN , "r" ) as f :
571
+ self . assertIsInstance ( f , LZMAFile )
572
+ with LZMAFile (TESTFN , "rb" ) as f :
573
+ self . assertIsInstance ( f , LZMAFile )
574
+ with LZMAFile (TESTFN , "w" ) as f :
575
+ self . assertIsInstance ( f , LZMAFile )
576
+ with LZMAFile (TESTFN , "wb" ) as f :
577
+ self . assertIsInstance ( f , LZMAFile )
578
+ with LZMAFile (TESTFN , "a" ) as f :
579
+ self . assertIsInstance ( f , LZMAFile )
580
+ with LZMAFile (TESTFN , "ab" ) as f :
581
+ self . assertIsInstance ( f , LZMAFile )
582
582
583
583
def test_init_with_x_mode (self ):
584
584
self .addCleanup (unlink , TESTFN )
585
585
for mode in ("x" , "xb" ):
586
586
unlink (TESTFN )
587
587
with LZMAFile (TESTFN , mode ) as f :
588
- pass
588
+ self . assertIsInstance ( f , LZMAFile )
589
589
with self .assertRaises (FileExistsError ):
590
590
LZMAFile (TESTFN , mode )
591
591
0 commit comments