@@ -373,7 +373,6 @@ def test_alias(self):
373373 self .assertEqual (get_args (alias_3 ), (LiteralString ,))
374374
375375class TypeVarTests (BaseTestCase ):
376- # TODO: RUSTPYTHON
377376 def test_basic_plain (self ):
378377 T = TypeVar ('T' )
379378 # T equals itself.
@@ -388,8 +387,6 @@ def test_basic_plain(self):
388387 self .assertIs (T .__infer_variance__ , False )
389388 self .assertEqual (T .__module__ , __name__ )
390389
391- # TODO: RUSTPYTHON
392- @unittest .expectedFailure
393390 def test_basic_with_exec (self ):
394391 ns = {}
395392 exec ('from typing import TypeVar; T = TypeVar("T", bound=float)' , ns , ns )
@@ -403,7 +400,6 @@ def test_basic_with_exec(self):
403400 self .assertIs (T .__infer_variance__ , False )
404401 self .assertIs (T .__module__ , None )
405402
406- # TODO: RUSTPYTHON
407403 def test_attributes (self ):
408404 T_bound = TypeVar ('T_bound' , bound = int )
409405 self .assertEqual (T_bound .__name__ , 'T_bound' )
@@ -445,7 +441,6 @@ def test_typevar_subclass_type_error(self):
445441 with self .assertRaises (TypeError ):
446442 issubclass (T , int )
447443
448- # TODO: RUSTPYTHON
449444 def test_constrained_error (self ):
450445 with self .assertRaises (TypeError ):
451446 X = TypeVar ('X' , int )
@@ -478,7 +473,6 @@ def test_union_constrained(self):
478473 A = TypeVar ('A' , str , bytes )
479474 self .assertNotEqual (Union [A , str ], Union [A ])
480475
481- # TODO: RUSTPYTHON
482476 def test_repr (self ):
483477 self .assertEqual (repr (T ), '~T' )
484478 self .assertEqual (repr (KT ), '~KT' )
@@ -493,7 +487,6 @@ def test_no_redefinition(self):
493487 self .assertNotEqual (TypeVar ('T' ), TypeVar ('T' ))
494488 self .assertNotEqual (TypeVar ('T' , int , str ), TypeVar ('T' , int , str ))
495489
496- # TODO: RUSTPYTHON
497490 def test_cannot_subclass (self ):
498491 with self .assertRaisesRegex (TypeError , NOT_A_BASE_TYPE % 'TypeVar' ):
499492 class V (TypeVar ): pass
@@ -573,7 +566,6 @@ def test_many_weakrefs(self):
573566 vals [x ] = cls (str (x ))
574567 del vals
575568
576- # TODO: RUSTPYTHON
577569 def test_constructor (self ):
578570 T = TypeVar (name = "T" )
579571 self .assertEqual (T .__name__ , "T" )
@@ -654,7 +646,6 @@ class X[T]: ...
654646 self .assertIs (T .__default__ , NoDefault )
655647 self .assertFalse (T .has_default ())
656648
657- # TODO: RUSTPYTHON
658649 def test_paramspec (self ):
659650 P = ParamSpec ('P' , default = (str , int ))
660651 self .assertEqual (P .__default__ , (str , int ))
@@ -682,7 +673,6 @@ class X[**P]: ...
682673 self .assertIs (P .__default__ , NoDefault )
683674 self .assertFalse (P .has_default ())
684675
685- # TODO: RUSTPYTHON
686676 def test_typevartuple (self ):
687677 Ts = TypeVarTuple ('Ts' , default = Unpack [Tuple [str , int ]])
688678 self .assertEqual (Ts .__default__ , Unpack [Tuple [str , int ]])
@@ -1284,20 +1274,16 @@ class Gen[*Ts]: ...
12841274
12851275class TypeVarTupleTests (BaseTestCase ):
12861276
1287- # TODO: RUSTPYTHON
12881277 def test_name (self ):
12891278 Ts = TypeVarTuple ('Ts' )
12901279 self .assertEqual (Ts .__name__ , 'Ts' )
12911280 Ts2 = TypeVarTuple ('Ts2' )
12921281 self .assertEqual (Ts2 .__name__ , 'Ts2' )
12931282
1294- # TODO: RUSTPYTHON
12951283 def test_module (self ):
12961284 Ts = TypeVarTuple ('Ts' )
12971285 self .assertEqual (Ts .__module__ , __name__ )
12981286
1299- # TODO: RUSTPYTHON
1300- @unittest .expectedFailure
13011287 def test_exec (self ):
13021288 ns = {}
13031289 exec ('from typing import TypeVarTuple; Ts = TypeVarTuple("Ts")' , ns )
@@ -4270,7 +4256,6 @@ class Node(Generic[T]): ...
42704256 self .assertEqual (t , copy (t ))
42714257 self .assertEqual (t , deepcopy (t ))
42724258
4273- # TODO: RUSTPYTHON
42744259 def test_immutability_by_copy_and_pickle (self ):
42754260 # Special forms like Union, Any, etc., generic aliases to containers like List,
42764261 # Mapping, etc., and type variabcles are considered immutable by copy and pickle.
@@ -8792,16 +8777,13 @@ def test_cannot_subscript(self):
87928777
87938778class ParamSpecTests (BaseTestCase ):
87948779
8795- # TODO: RUSTPYTHON
87968780 def test_basic_plain (self ):
87978781 P = ParamSpec ('P' )
87988782 self .assertEqual (P , P )
87998783 self .assertIsInstance (P , ParamSpec )
88008784 self .assertEqual (P .__name__ , 'P' )
88018785 self .assertEqual (P .__module__ , __name__ )
88028786
8803- # TODO: RUSTPYTHON
8804- @unittest .expectedFailure
88058787 def test_basic_with_exec (self ):
88068788 ns = {}
88078789 exec ('from typing import ParamSpec; P = ParamSpec("P")' , ns , ns )
@@ -9000,7 +8982,6 @@ class Y(Generic[P, T]):
90008982 B = A [[int , str ], bytes , float ]
90018983 self .assertEqual (B .__args__ , ((int , str ,), Tuple [bytes , float ]))
90028984
9003- # TODO: RUSTPYTHON
90048985 def test_var_substitution (self ):
90058986 P = ParamSpec ("P" )
90068987 subst = P .__typing_subst__
@@ -9011,7 +8992,6 @@ def test_var_substitution(self):
90118992 self .assertIs (subst (P ), P )
90128993 self .assertEqual (subst (Concatenate [int , P ]), Concatenate [int , P ])
90138994
9014- # TODO: RUSTPYTHON
90158995 def test_bad_var_substitution (self ):
90168996 T = TypeVar ('T' )
90178997 P = ParamSpec ('P' )
@@ -9191,8 +9171,6 @@ def test_paramspec_gets_copied(self):
91919171 self .assertEqual (C2 [Concatenate [str , P2 ]].__parameters__ , (P2 ,))
91929172 self .assertEqual (C2 [Concatenate [T , P2 ]].__parameters__ , (T , P2 ))
91939173
9194- # TODO: RUSTPYTHON
9195- @unittest .expectedFailure
91969174 def test_cannot_subclass (self ):
91979175 with self .assertRaisesRegex (TypeError , NOT_A_BASE_TYPE % 'ParamSpec' ):
91989176 class C (ParamSpec ): pass
@@ -9229,7 +9207,6 @@ def test_dir(self):
92299207 with self .subTest (required_item = required_item ):
92309208 self .assertIn (required_item , dir_items )
92319209
9232- # TODO: RUSTPYTHON
92339210 def test_valid_uses (self ):
92349211 P = ParamSpec ('P' )
92359212 T = TypeVar ('T' )
0 commit comments