(self)
| 965 | run_test(test6) |
| 966 | |
| 967 | def test_aiter_bad_args(self): |
| 968 | async def gen(): |
| 969 | yield 1 |
| 970 | async def call_with_too_few_args(): |
| 971 | await aiter() |
| 972 | async def call_with_too_many_args(): |
| 973 | await aiter(gen(), 1) |
| 974 | async def call_with_wrong_type_arg(): |
| 975 | await aiter(1) |
| 976 | with self.assertRaises(TypeError): |
| 977 | self.loop.run_until_complete(call_with_too_few_args()) |
| 978 | with self.assertRaises(TypeError): |
| 979 | self.loop.run_until_complete(call_with_too_many_args()) |
| 980 | with self.assertRaises(TypeError): |
| 981 | self.loop.run_until_complete(call_with_wrong_type_arg()) |
| 982 | |
| 983 | async def to_list(self, gen): |
| 984 | res = [] |
nothing calls this directly
no test coverage detected