summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_collections.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_collections.py')
-rw-r--r--Lib/test/test_collections.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py
index db7f9e7..5da446a 100644
--- a/Lib/test/test_collections.py
+++ b/Lib/test/test_collections.py
@@ -802,6 +802,8 @@ class TestOneTrickPonyABCs(ABCTestCase):
def __await__(self):
yield
+ self.validate_abstract_methods(Awaitable, '__await__')
+
non_samples = [None, int(), gen(), object()]
for x in non_samples:
self.assertNotIsInstance(x, Awaitable)
@@ -852,6 +854,8 @@ class TestOneTrickPonyABCs(ABCTestCase):
def __await__(self):
yield
+ self.validate_abstract_methods(Coroutine, '__await__', 'send', 'throw')
+
non_samples = [None, int(), gen(), object(), Bar()]
for x in non_samples:
self.assertNotIsInstance(x, Coroutine)
@@ -1935,6 +1939,7 @@ class TestCollectionABCs(ABCTestCase):
self.assertFalse(issubclass(sample, ByteString))
self.assertNotIsInstance(memoryview(b""), ByteString)
self.assertFalse(issubclass(memoryview, ByteString))
+ self.validate_abstract_methods(ByteString, '__getitem__', '__len__')
def test_MutableSequence(self):
for sample in [tuple, str, bytes]: