@@ -802,6 +802,8 @@ def throw(self, typ, val=None, tb=None):
802802 def __await__ (self ):
803803 yield
804804
805+ self .validate_abstract_methods (Awaitable , '__await__' )
806+
805807 non_samples = [None , int (), gen (), object ()]
806808 for x in non_samples :
807809 self .assertNotIsInstance (x , Awaitable )
@@ -852,6 +854,8 @@ def throw(self, typ, val=None, tb=None):
852854 def __await__ (self ):
853855 yield
854856
857+ self .validate_abstract_methods (Coroutine , '__await__' , 'send' , 'throw' )
858+
855859 non_samples = [None , int (), gen (), object (), Bar ()]
856860 for x in non_samples :
857861 self .assertNotIsInstance (x , Coroutine )
@@ -1935,6 +1939,7 @@ def test_ByteString(self):
19351939 self .assertFalse (issubclass (sample , ByteString ))
19361940 self .assertNotIsInstance (memoryview (b"" ), ByteString )
19371941 self .assertFalse (issubclass (memoryview , ByteString ))
1942+ self .validate_abstract_methods (ByteString , '__getitem__' , '__len__' )
19381943
19391944 def test_MutableSequence (self ):
19401945 for sample in [tuple , str , bytes ]:
0 commit comments