MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_AsyncIterable

Method test_AsyncIterable

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected