()
| 1070 | yield v * 100 |
| 1071 | |
| 1072 | async def run(): |
| 1073 | it = foo().__aiter__() |
| 1074 | |
| 1075 | try: |
| 1076 | it.__anext__().send(None) |
| 1077 | except StopIteration as ex: |
| 1078 | self.assertEqual(ex.args[0], 1) |
| 1079 | else: |
| 1080 | self.fail('StopIteration was not raised') |
| 1081 | |
| 1082 | try: |
| 1083 | it.__anext__().send(10) |
| 1084 | except StopIteration as ex: |
| 1085 | self.assertEqual(ex.args[0], 10) |
| 1086 | else: |
| 1087 | self.fail('StopIteration was not raised') |
| 1088 | |
| 1089 | try: |
| 1090 | it.__anext__().send(12) |
| 1091 | except StopIteration as ex: |
| 1092 | self.assertEqual(ex.args[0], 1200) |
| 1093 | else: |
| 1094 | self.fail('StopIteration was not raised') |
| 1095 | |
| 1096 | with self.assertRaises(StopAsyncIteration): |
| 1097 | await it.__anext__() |
| 1098 | |
| 1099 | self.loop.run_until_complete(run()) |
| 1100 |
no test coverage detected