@@ -7203,11 +7203,9 @@ def test_alias_types_and_substitutions(self):
72037203 Unpack [Ts ] : (Ts ,),
72047204 Unpack [Tuple [int , T2 ]] : (T2 ,),
72057205 Concatenate [int , P ] : (P ,),
7206+ # Not tested usage of bare TypeVarTuple, would need 3.11+
7207+ # Ts : (Ts,), # invalid case
72067208 }
7207- test_argument_cases_311_plus = {
7208- Ts : (Ts ,), # invalid case
7209- }
7210- test_argument_cases .update (test_argument_cases_311_plus )
72117209
72127210 test_alias_cases = [
72137211 # Simple cases
@@ -7241,8 +7239,6 @@ def test_alias_types_and_substitutions(self):
72417239 self .assertEqual (subscripted .__parameters__ , ())
72427240 for expected_args , expected_parameters in test_argument_cases .items ():
72437241 with self .subTest (alias = alias , args = expected_args ):
7244- if expected_args in test_argument_cases_311_plus and sys .version_info < (3 , 11 ):
7245- self .skipTest ("Case is not valid before 3.11" )
72467242 self .assertEqual (get_args (alias [expected_args ]), (expected_args ,))
72477243 self .assertEqual (alias [expected_args ].__parameters__ , expected_parameters )
72487244
@@ -7419,9 +7415,9 @@ def test_wrong_amount_of_parameters(self):
74197415 self .assertEqual (get_args (alias ), expected_args )
74207416 self .assertEqual (alias .__parameters__ , expected_params )
74217417
7422- # The condition should align with the version of GeneriAlias usage in __getitem__
7418+ # The condition should align with the version of GeneriAlias usage in __getitem__ or be 3.11+
74237419 @skipIf (TYPING_3_10_0 , "Most arguments are allowed in 3.11+ or with GenericAlias" )
7424- def test_invalid_cases_before_3_11 (self ):
7420+ def test_invalid_cases_before_3_10 (self ):
74257421 T = TypeVar ('T' )
74267422 ListOrSetT = TypeAliasType ("ListOrSetT" , Union [List [T ], Set [T ]], type_params = (T ,))
74277423 with self .assertRaises (TypeError ):
0 commit comments