@@ -262,8 +262,7 @@ def __contains__(self, key):
262
262
d = c .new_child (b = 20 , c = 30 )
263
263
self .assertEqual (d .maps , [{'b' : 20 , 'c' : 30 }, {'a' : 1 , 'b' : 2 }])
264
264
265
- # TODO: RUSTPYTHON
266
- @unittest .expectedFailure
265
+ @unittest .expectedFailure # TODO: RUSTPYTHON
267
266
def test_union_operators (self ):
268
267
cm1 = ChainMap (dict (a = 1 , b = 2 ), dict (c = 3 , d = 4 ))
269
268
cm2 = ChainMap (dict (a = 10 , e = 5 ), dict (b = 20 , d = 4 ))
@@ -470,8 +469,7 @@ def test_module_parameter(self):
470
469
NT = namedtuple ('NT' , ['x' , 'y' ], module = collections )
471
470
self .assertEqual (NT .__module__ , collections )
472
471
473
- # TODO: RUSTPYTHON
474
- @unittest .expectedFailure
472
+ @unittest .expectedFailure # TODO: RUSTPYTHON
475
473
def test_instance (self ):
476
474
Point = namedtuple ('Point' , 'x y' )
477
475
p = Point (11 , 22 )
@@ -740,7 +738,7 @@ def validate_abstract_methods(self, abc, *names):
740
738
stubs = methodstubs .copy ()
741
739
del stubs [name ]
742
740
C = type ('C' , (abc ,), stubs )
743
- self .assertRaises (TypeError , C , name )
741
+ self .assertRaises (TypeError , C )
744
742
745
743
def validate_isinstance (self , abc , name ):
746
744
stub = lambda s , * args : 0
@@ -790,8 +788,7 @@ def _test_gen():
790
788
791
789
class TestOneTrickPonyABCs (ABCTestCase ):
792
790
793
- # TODO: RUSTPYTHON
794
- @unittest .expectedFailure
791
+ @unittest .expectedFailure # TODO: RUSTPYTHON
795
792
def test_Awaitable (self ):
796
793
def gen ():
797
794
yield
@@ -844,8 +841,7 @@ class CoroLike: pass
844
841
CoroLike = None
845
842
support .gc_collect () # Kill CoroLike to clean-up ABCMeta cache
846
843
847
- # TODO: RUSTPYTHON
848
- @unittest .expectedFailure
844
+ @unittest .expectedFailure # TODO: RUSTPYTHON
849
845
def test_Coroutine (self ):
850
846
def gen ():
851
847
yield
@@ -971,7 +967,7 @@ class AnextOnly:
971
967
async def __anext__ (self ):
972
968
raise StopAsyncIteration
973
969
self .assertNotIsInstance (AnextOnly (), AsyncIterator )
974
- self .validate_abstract_methods (AsyncIterator , '__anext__' , '__aiter__' )
970
+ self .validate_abstract_methods (AsyncIterator , '__anext__' )
975
971
976
972
def test_Iterable (self ):
977
973
# Check some non-iterables
@@ -1168,7 +1164,7 @@ def test_Iterator(self):
1168
1164
for x in samples :
1169
1165
self .assertIsInstance (x , Iterator )
1170
1166
self .assertTrue (issubclass (type (x ), Iterator ), repr (type (x )))
1171
- self .validate_abstract_methods (Iterator , '__next__' , '__iter__' )
1167
+ self .validate_abstract_methods (Iterator , '__next__' )
1172
1168
1173
1169
# Issue 10565
1174
1170
class NextOnly :
@@ -1852,8 +1848,7 @@ def test_Mapping(self):
1852
1848
for sample in [dict ]:
1853
1849
self .assertIsInstance (sample (), Mapping )
1854
1850
self .assertTrue (issubclass (sample , Mapping ))
1855
- self .validate_abstract_methods (Mapping , '__contains__' , '__iter__' , '__len__' ,
1856
- '__getitem__' )
1851
+ self .validate_abstract_methods (Mapping , '__iter__' , '__len__' , '__getitem__' )
1857
1852
class MyMapping (Mapping ):
1858
1853
def __len__ (self ):
1859
1854
return 0
@@ -1868,7 +1863,7 @@ def test_MutableMapping(self):
1868
1863
for sample in [dict ]:
1869
1864
self .assertIsInstance (sample (), MutableMapping )
1870
1865
self .assertTrue (issubclass (sample , MutableMapping ))
1871
- self .validate_abstract_methods (MutableMapping , '__contains__' , ' __iter__' , '__len__' ,
1866
+ self .validate_abstract_methods (MutableMapping , '__iter__' , '__len__' ,
1872
1867
'__getitem__' , '__setitem__' , '__delitem__' )
1873
1868
1874
1869
def test_MutableMapping_subclass (self ):
@@ -1907,8 +1902,7 @@ def test_Sequence(self):
1907
1902
self .assertIsInstance (memoryview (b"" ), Sequence )
1908
1903
self .assertTrue (issubclass (memoryview , Sequence ))
1909
1904
self .assertTrue (issubclass (str , Sequence ))
1910
- self .validate_abstract_methods (Sequence , '__contains__' , '__iter__' , '__len__' ,
1911
- '__getitem__' )
1905
+ self .validate_abstract_methods (Sequence , '__len__' , '__getitem__' )
1912
1906
1913
1907
def test_Sequence_mixins (self ):
1914
1908
class SequenceSubclass (Sequence ):
@@ -1967,10 +1961,7 @@ class X(ByteString): pass
1967
1961
# No metaclass conflict
1968
1962
class Z (ByteString , Awaitable ): pass
1969
1963
1970
- # TODO: RUSTPYTHON
1971
- # Need to implement __buffer__ and __release_buffer__
1972
- # https://docs.python.org/3.13/reference/datamodel.html#emulating-buffer-types
1973
- @unittest .expectedFailure
1964
+ @unittest .expectedFailure # TODO: RUSTPYTHON; Need to implement __buffer__ and __release_buffer__ (https://docs.python.org/3.13/reference/datamodel.html#emulating-buffer-types)
1974
1965
def test_Buffer (self ):
1975
1966
for sample in [bytes , bytearray , memoryview ]:
1976
1967
self .assertIsInstance (sample (b"x" ), Buffer )
@@ -1989,8 +1980,8 @@ def test_MutableSequence(self):
1989
1980
self .assertTrue (issubclass (sample , MutableSequence ))
1990
1981
self .assertTrue (issubclass (array .array , MutableSequence ))
1991
1982
self .assertFalse (issubclass (str , MutableSequence ))
1992
- self .validate_abstract_methods (MutableSequence , '__contains__ ' , '__iter__ ' ,
1993
- '__len__' , '__getitem__' , '__setitem__' , '__delitem__' , 'insert' )
1983
+ self .validate_abstract_methods (MutableSequence , '__len__ ' , '__getitem__ ' ,
1984
+ '__setitem__' , '__delitem__' , 'insert' )
1994
1985
1995
1986
def test_MutableSequence_mixins (self ):
1996
1987
# Test the mixins of MutableSequence by creating a minimal concrete
@@ -2042,8 +2033,7 @@ def insert(self, index, value):
2042
2033
self .assertEqual (len (mss ), len (mss2 ))
2043
2034
self .assertEqual (list (mss ), list (mss2 ))
2044
2035
2045
- # TODO: RUSTPYTHON
2046
- @unittest .expectedFailure
2036
+ @unittest .expectedFailure # TODO: RUSTPYTHON
2047
2037
def test_illegal_patma_flags (self ):
2048
2038
with self .assertRaises (TypeError ):
2049
2039
class Both (Collection ):
0 commit comments