@@ -742,6 +742,8 @@ def test_instancecheck_and_subclasscheck(self):
742
742
self .assertTrue (issubclass (dict , x ))
743
743
self .assertFalse (issubclass (list , x ))
744
744
745
+ # TODO: RUSTPYTHON
746
+ @unittest .expectedFailure
745
747
def test_instancecheck_and_subclasscheck_order (self ):
746
748
T = typing .TypeVar ('T' )
747
749
@@ -788,13 +790,17 @@ def __subclasscheck__(cls, sub):
788
790
self .assertTrue (issubclass (int , x ))
789
791
self .assertRaises (ZeroDivisionError , issubclass , list , x )
790
792
793
+ # TODO: RUSTPYTHON
794
+ @unittest .expectedFailure
791
795
def test_or_type_operator_with_TypeVar (self ):
792
796
TV = typing .TypeVar ('T' )
793
797
assert TV | str == typing .Union [TV , str ]
794
798
assert str | TV == typing .Union [str , TV ]
795
799
self .assertIs ((int | TV )[int ], int )
796
800
self .assertIs ((TV | int )[int ], int )
797
801
802
+ # TODO: RUSTPYTHON
803
+ @unittest .expectedFailure
798
804
def test_union_args (self ):
799
805
def check (arg , expected ):
800
806
clear_typing_caches ()
@@ -825,6 +831,8 @@ def check(arg, expected):
825
831
check (x | None , (x , type (None )))
826
832
check (None | x , (type (None ), x ))
827
833
834
+ # TODO: RUSTPYTHON
835
+ @unittest .expectedFailure
828
836
def test_union_parameter_chaining (self ):
829
837
T = typing .TypeVar ("T" )
830
838
S = typing .TypeVar ("S" )
@@ -869,6 +877,8 @@ def eq(actual, expected, typed=True):
869
877
eq (x [NT ], int | NT | bytes )
870
878
eq (x [S ], int | S | bytes )
871
879
880
+ # TODO: RUSTPYTHON
881
+ @unittest .expectedFailure
872
882
def test_union_pickle (self ):
873
883
orig = list [T ] | int
874
884
for proto in range (pickle .HIGHEST_PROTOCOL + 1 ):
@@ -878,19 +888,25 @@ def test_union_pickle(self):
878
888
self .assertEqual (loaded .__args__ , orig .__args__ )
879
889
self .assertEqual (loaded .__parameters__ , orig .__parameters__ )
880
890
891
+ # TODO: RUSTPYTHON
892
+ @unittest .expectedFailure
881
893
def test_union_copy (self ):
882
894
orig = list [T ] | int
883
895
for copied in (copy .copy (orig ), copy .deepcopy (orig )):
884
896
self .assertEqual (copied , orig )
885
897
self .assertEqual (copied .__args__ , orig .__args__ )
886
898
self .assertEqual (copied .__parameters__ , orig .__parameters__ )
887
899
900
+ # TODO: RUSTPYTHON
901
+ @unittest .expectedFailure
888
902
def test_union_parameter_substitution_errors (self ):
889
903
T = typing .TypeVar ("T" )
890
904
x = int | T
891
905
with self .assertRaises (TypeError ):
892
906
x [int , str ]
893
907
908
+ # TODO: RUSTPYTHON
909
+ @unittest .expectedFailure
894
910
def test_or_type_operator_with_forward (self ):
895
911
T = typing .TypeVar ('T' )
896
912
ForwardAfter = T | 'Forward'
0 commit comments