@@ -262,8 +262,7 @@ def __contains__(self, key):
262262 d = c .new_child (b = 20 , c = 30 )
263263 self .assertEqual (d .maps , [{'b' : 20 , 'c' : 30 }, {'a' : 1 , 'b' : 2 }])
264264
265- # TODO: RUSTPYTHON
266- @unittest .expectedFailure
265+ @unittest .expectedFailure # TODO: RUSTPYTHON
267266 def test_union_operators (self ):
268267 cm1 = ChainMap (dict (a = 1 , b = 2 ), dict (c = 3 , d = 4 ))
269268 cm2 = ChainMap (dict (a = 10 , e = 5 ), dict (b = 20 , d = 4 ))
@@ -470,8 +469,7 @@ def test_module_parameter(self):
470469 NT = namedtuple ('NT' , ['x' , 'y' ], module = collections )
471470 self .assertEqual (NT .__module__ , collections )
472471
473- # TODO: RUSTPYTHON
474- @unittest .expectedFailure
472+ @unittest .expectedFailure # TODO: RUSTPYTHON
475473 def test_instance (self ):
476474 Point = namedtuple ('Point' , 'x y' )
477475 p = Point (11 , 22 )
@@ -740,7 +738,7 @@ def validate_abstract_methods(self, abc, *names):
740738 stubs = methodstubs .copy ()
741739 del stubs [name ]
742740 C = type ('C' , (abc ,), stubs )
743- self .assertRaises (TypeError , C , name )
741+ self .assertRaises (TypeError , C )
744742
745743 def validate_isinstance (self , abc , name ):
746744 stub = lambda s , * args : 0
@@ -790,8 +788,7 @@ def _test_gen():
790788
791789class TestOneTrickPonyABCs (ABCTestCase ):
792790
793- # TODO: RUSTPYTHON
794- @unittest .expectedFailure
791+ @unittest .expectedFailure # TODO: RUSTPYTHON
795792 def test_Awaitable (self ):
796793 def gen ():
797794 yield
@@ -844,8 +841,7 @@ class CoroLike: pass
844841 CoroLike = None
845842 support .gc_collect () # Kill CoroLike to clean-up ABCMeta cache
846843
847- # TODO: RUSTPYTHON
848- @unittest .expectedFailure
844+ @unittest .expectedFailure # TODO: RUSTPYTHON
849845 def test_Coroutine (self ):
850846 def gen ():
851847 yield
@@ -971,7 +967,7 @@ class AnextOnly:
971967 async def __anext__ (self ):
972968 raise StopAsyncIteration
973969 self .assertNotIsInstance (AnextOnly (), AsyncIterator )
974- self .validate_abstract_methods (AsyncIterator , '__anext__' , '__aiter__' )
970+ self .validate_abstract_methods (AsyncIterator , '__anext__' )
975971
976972 def test_Iterable (self ):
977973 # Check some non-iterables
@@ -1168,7 +1164,7 @@ def test_Iterator(self):
11681164 for x in samples :
11691165 self .assertIsInstance (x , Iterator )
11701166 self .assertTrue (issubclass (type (x ), Iterator ), repr (type (x )))
1171- self .validate_abstract_methods (Iterator , '__next__' , '__iter__' )
1167+ self .validate_abstract_methods (Iterator , '__next__' )
11721168
11731169 # Issue 10565
11741170 class NextOnly :
@@ -1852,8 +1848,7 @@ def test_Mapping(self):
18521848 for sample in [dict ]:
18531849 self .assertIsInstance (sample (), Mapping )
18541850 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__' )
18571852 class MyMapping (Mapping ):
18581853 def __len__ (self ):
18591854 return 0
@@ -1868,7 +1863,7 @@ def test_MutableMapping(self):
18681863 for sample in [dict ]:
18691864 self .assertIsInstance (sample (), MutableMapping )
18701865 self .assertTrue (issubclass (sample , MutableMapping ))
1871- self .validate_abstract_methods (MutableMapping , '__contains__' , ' __iter__' , '__len__' ,
1866+ self .validate_abstract_methods (MutableMapping , '__iter__' , '__len__' ,
18721867 '__getitem__' , '__setitem__' , '__delitem__' )
18731868
18741869 def test_MutableMapping_subclass (self ):
@@ -1907,8 +1902,7 @@ def test_Sequence(self):
19071902 self .assertIsInstance (memoryview (b"" ), Sequence )
19081903 self .assertTrue (issubclass (memoryview , Sequence ))
19091904 self .assertTrue (issubclass (str , Sequence ))
1910- self .validate_abstract_methods (Sequence , '__contains__' , '__iter__' , '__len__' ,
1911- '__getitem__' )
1905+ self .validate_abstract_methods (Sequence , '__len__' , '__getitem__' )
19121906
19131907 def test_Sequence_mixins (self ):
19141908 class SequenceSubclass (Sequence ):
@@ -1967,10 +1961,7 @@ class X(ByteString): pass
19671961 # No metaclass conflict
19681962 class Z (ByteString , Awaitable ): pass
19691963
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)
19741965 def test_Buffer (self ):
19751966 for sample in [bytes , bytearray , memoryview ]:
19761967 self .assertIsInstance (sample (b"x" ), Buffer )
@@ -1989,8 +1980,8 @@ def test_MutableSequence(self):
19891980 self .assertTrue (issubclass (sample , MutableSequence ))
19901981 self .assertTrue (issubclass (array .array , MutableSequence ))
19911982 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' )
19941985
19951986 def test_MutableSequence_mixins (self ):
19961987 # Test the mixins of MutableSequence by creating a minimal concrete
@@ -2042,8 +2033,7 @@ def insert(self, index, value):
20422033 self .assertEqual (len (mss ), len (mss2 ))
20432034 self .assertEqual (list (mss ), list (mss2 ))
20442035
2045- # TODO: RUSTPYTHON
2046- @unittest .expectedFailure
2036+ @unittest .expectedFailure # TODO: RUSTPYTHON
20472037 def test_illegal_patma_flags (self ):
20482038 with self .assertRaises (TypeError ):
20492039 class Both (Collection ):
0 commit comments