File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -606,12 +606,13 @@ def test_stat_attributes_bytes(self):
606
606
def test_stat_result_pickle (self ):
607
607
result = os .stat (self .fname )
608
608
for proto in range (pickle .HIGHEST_PROTOCOL + 1 ):
609
- p = pickle .dumps (result , proto )
610
- self .assertIn (b'stat_result' , p )
611
- if proto < 4 :
612
- self .assertIn (b'cos\n stat_result\n ' , p )
613
- unpickled = pickle .loads (p )
614
- self .assertEqual (result , unpickled )
609
+ with self .subTest (f'protocol { proto } ' ):
610
+ p = pickle .dumps (result , proto )
611
+ self .assertIn (b'stat_result' , p )
612
+ if proto < 4 :
613
+ self .assertIn (b'cos\n stat_result\n ' , p )
614
+ unpickled = pickle .loads (p )
615
+ self .assertEqual (result , unpickled )
615
616
616
617
@unittest .skipUnless (hasattr (os , 'statvfs' ), 'test needs os.statvfs()' )
617
618
def test_statvfs_attributes (self ):
You can’t perform that action at this time.
0 commit comments