@@ -742,6 +742,8 @@ def test_instancecheck_and_subclasscheck(self):
742742 self .assertTrue (issubclass (dict , x ))
743743 self .assertFalse (issubclass (list , x ))
744744
745+ # TODO: RUSTPYTHON
746+ @unittest .expectedFailure
745747 def test_instancecheck_and_subclasscheck_order (self ):
746748 T = typing .TypeVar ('T' )
747749
@@ -788,13 +790,17 @@ def __subclasscheck__(cls, sub):
788790 self .assertTrue (issubclass (int , x ))
789791 self .assertRaises (ZeroDivisionError , issubclass , list , x )
790792
793+ # TODO: RUSTPYTHON
794+ @unittest .expectedFailure
791795 def test_or_type_operator_with_TypeVar (self ):
792796 TV = typing .TypeVar ('T' )
793797 assert TV | str == typing .Union [TV , str ]
794798 assert str | TV == typing .Union [str , TV ]
795799 self .assertIs ((int | TV )[int ], int )
796800 self .assertIs ((TV | int )[int ], int )
797801
802+ # TODO: RUSTPYTHON
803+ @unittest .expectedFailure
798804 def test_union_args (self ):
799805 def check (arg , expected ):
800806 clear_typing_caches ()
@@ -825,6 +831,8 @@ def check(arg, expected):
825831 check (x | None , (x , type (None )))
826832 check (None | x , (type (None ), x ))
827833
834+ # TODO: RUSTPYTHON
835+ @unittest .expectedFailure
828836 def test_union_parameter_chaining (self ):
829837 T = typing .TypeVar ("T" )
830838 S = typing .TypeVar ("S" )
@@ -869,6 +877,8 @@ def eq(actual, expected, typed=True):
869877 eq (x [NT ], int | NT | bytes )
870878 eq (x [S ], int | S | bytes )
871879
880+ # TODO: RUSTPYTHON
881+ @unittest .expectedFailure
872882 def test_union_pickle (self ):
873883 orig = list [T ] | int
874884 for proto in range (pickle .HIGHEST_PROTOCOL + 1 ):
@@ -878,19 +888,25 @@ def test_union_pickle(self):
878888 self .assertEqual (loaded .__args__ , orig .__args__ )
879889 self .assertEqual (loaded .__parameters__ , orig .__parameters__ )
880890
891+ # TODO: RUSTPYTHON
892+ @unittest .expectedFailure
881893 def test_union_copy (self ):
882894 orig = list [T ] | int
883895 for copied in (copy .copy (orig ), copy .deepcopy (orig )):
884896 self .assertEqual (copied , orig )
885897 self .assertEqual (copied .__args__ , orig .__args__ )
886898 self .assertEqual (copied .__parameters__ , orig .__parameters__ )
887899
900+ # TODO: RUSTPYTHON
901+ @unittest .expectedFailure
888902 def test_union_parameter_substitution_errors (self ):
889903 T = typing .TypeVar ("T" )
890904 x = int | T
891905 with self .assertRaises (TypeError ):
892906 x [int , str ]
893907
908+ # TODO: RUSTPYTHON
909+ @unittest .expectedFailure
894910 def test_or_type_operator_with_forward (self ):
895911 T = typing .TypeVar ('T' )
896912 ForwardAfter = T | 'Forward'
0 commit comments