(self)
| 763 | self.assertIs(applied_once, applied_twice) |
| 764 | |
| 765 | def test_anext_bad_args(self): |
| 766 | async def gen(): |
| 767 | yield 1 |
| 768 | async def call_with_too_few_args(): |
| 769 | await anext() |
| 770 | async def call_with_too_many_args(): |
| 771 | await anext(gen(), 1, 3) |
| 772 | async def call_with_wrong_type_args(): |
| 773 | await anext(1, gen()) |
| 774 | async def call_with_kwarg(): |
| 775 | await anext(aiterator=gen()) |
| 776 | with self.assertRaises(TypeError): |
| 777 | self.loop.run_until_complete(call_with_too_few_args()) |
| 778 | with self.assertRaises(TypeError): |
| 779 | self.loop.run_until_complete(call_with_too_many_args()) |
| 780 | with self.assertRaises(TypeError): |
| 781 | self.loop.run_until_complete(call_with_wrong_type_args()) |
| 782 | with self.assertRaises(TypeError): |
| 783 | self.loop.run_until_complete(call_with_kwarg()) |
| 784 | |
| 785 | def test_anext_bad_await(self): |
| 786 | async def bad_awaitable(): |
nothing calls this directly
no test coverage detected