@@ -3227,8 +3227,8 @@ def f(x: int) -> int:
32273227        for  r  in  range (1 , len (base_flags ) +  1 ):
32283228            for  choices  in  itertools .combinations (base_flags , r = r ):
32293229                for  args  in  itertools .product (* choices ):
3230-                     with  self .subTest (flags = args [ 1 :] ):
3231-                         _   =   self .invoke_ast (* args )
3230+                     with  self .subTest (flags = args ):
3231+                         self .invoke_ast (* args )
32323232
32333233    def  test_unknown_flag (self ):
32343234        with  self .assertRaises (SystemExit ):
@@ -3258,7 +3258,8 @@ def test_exec_mode_flag(self):
32583258                  TypeIgnore(lineno=1, tag='[assignment]')]) 
32593259        ''' 
32603260        for  flag  in  ('-m=exec' , '--mode=exec' ):
3261-             self .check_output (source , expect , flag )
3261+             with  self .subTest (flags = flag ):
3262+                 self .check_output (source , expect , flag )
32623263
32633264    def  test_single_mode_flag (self ):
32643265        # test 'python -m ast -m/--mode single' 
@@ -3269,7 +3270,8 @@ def test_single_mode_flag(self):
32693270                  Pass()]) 
32703271        ''' 
32713272        for  flag  in  ('-m=single' , '--mode=single' ):
3272-             self .check_output (source , expect , flag )
3273+             with  self .subTest (flags = flag ):
3274+                 self .check_output (source , expect , flag )
32733275
32743276    def  test_eval_mode_flag (self ):
32753277        # test 'python -m ast -m/--mode eval' 
@@ -3284,7 +3286,8 @@ def test_eval_mode_flag(self):
32843286                     Constant(value=3)])) 
32853287        ''' 
32863288        for  flag  in  ('-m=eval' , '--mode=eval' ):
3287-             self .check_output (source , expect , flag )
3289+             with  self .subTest (flags = flag ):
3290+                 self .check_output (source , expect , flag )
32883291
32893292    def  test_func_type_mode_flag (self ):
32903293        # test 'python -m ast -m/--mode func_type' 
@@ -3300,7 +3303,8 @@ def test_func_type_mode_flag(self):
33003303                  ctx=Load())) 
33013304        ''' 
33023305        for  flag  in  ('-m=func_type' , '--mode=func_type' ):
3303-             self .check_output (source , expect , flag )
3306+             with  self .subTest (flags = flag ):
3307+                 self .check_output (source , expect , flag )
33043308
33053309    def  test_no_type_comments_flag (self ):
33063310        # test 'python -m ast --no-type-comments' 
@@ -3329,7 +3333,8 @@ def test_include_attributes_flag(self):
33293333                     end_col_offset=4)]) 
33303334        ''' 
33313335        for  flag  in  ('-a' , '--include-attributes' ):
3332-             self .check_output (source , expect , flag )
3336+             with  self .subTest (flags = flag ):
3337+                 self .check_output (source , expect , flag )
33333338
33343339    def  test_indent_flag (self ):
33353340        # test 'python -m ast -i/--indent' 
@@ -3340,7 +3345,8 @@ def test_indent_flag(self):
33403345            Pass()]) 
33413346        ''' 
33423347        for  flag  in  ('-i=0' , '--indent=0' ):
3343-             self .check_output (source , expect , flag )
3348+             with  self .subTest (flags = flag ):
3349+                 self .check_output (source , expect , flag )
33443350
33453351
33463352class  ASTOptimiziationTests (unittest .TestCase ):
0 commit comments