File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -7307,9 +7307,15 @@ def test_getitem(self):
73077307 subscripted = ListOrSetT [int ]
73087308 self .assertEqual (get_args (subscripted ), (int ,))
73097309 self .assertIs (get_origin (subscripted ), ListOrSetT )
7310- with self .assertRaises (TypeError , msg = "not a generic class" ):
7310+ with self .assertRaisesRegex (TypeError ,
7311+ "not a generic class"
7312+ # types.GenericAlias raises a different error in 3.10
7313+ if sys .version_info [:2 ] != (3 , 10 )
7314+ else "There are no type variables left in ListOrSetT"
7315+ ):
73117316 subscripted [int ]
73127317
7318+
73137319 still_generic = ListOrSetT [Iterable [T ]]
73147320 self .assertEqual (get_args (still_generic ), (Iterable [T ],))
73157321 self .assertIs (get_origin (still_generic ), ListOrSetT )
You can’t perform that action at this time.
0 commit comments