MCPcopy Index your code
hub / github.com/python/cpython / test_AsyncIterable

Method test_AsyncIterable

Lib/test/test_collections.py:935–947  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

933 self.validate_isinstance(Hashable, '__hash__')
934
935 def test_AsyncIterable(self):
936 class AI:
937 def __aiter__(self):
938 return self
939 self.assertIsInstance(AI(), AsyncIterable)
940 self.assertIsSubclass(AI, AsyncIterable)
941 # Check some non-iterables
942 non_samples = [None, object, []]
943 for x in non_samples:
944 self.assertNotIsInstance(x, AsyncIterable)
945 self.assertNotIsSubclass(type(x), AsyncIterable)
946 self.validate_abstract_methods(AsyncIterable, '__aiter__')
947 self.validate_isinstance(AsyncIterable, '__aiter__')
948
949 def test_AsyncIterator(self):
950 class AI:

Callers

nothing calls this directly

Calls 7

assertIsInstanceMethod · 0.80
assertIsSubclassMethod · 0.80
assertNotIsInstanceMethod · 0.80
assertNotIsSubclassMethod · 0.80
validate_isinstanceMethod · 0.80
AIClass · 0.70

Tested by

no test coverage detected