()
| 792 | raise CustomException |
| 793 | |
| 794 | async def main(): |
| 795 | task = asyncio.current_task() |
| 796 | try: |
| 797 | async with taskgroups.TaskGroup() as tg: |
| 798 | async with database(): |
| 799 | tg.create_task(raise_exc()) |
| 800 | await asyncio.sleep(1) |
| 801 | except* CustomException as err: |
| 802 | self.assertEqual(task.cancelling(), 0) |
| 803 | self.assertEqual(len(err.exceptions), 2) |
| 804 | |
| 805 | else: |
| 806 | self.fail('CustomException not raised') |
| 807 | |
| 808 | await asyncio.create_task(main()) |
| 809 |
no test coverage detected