(self)
| 2121 | aw.close() |
| 2122 | |
| 2123 | def test_pickle(self): |
| 2124 | async def func(): pass |
| 2125 | coro = func() |
| 2126 | for proto in range(pickle.HIGHEST_PROTOCOL + 1): |
| 2127 | with self.assertRaises((TypeError, pickle.PicklingError)): |
| 2128 | pickle.dumps(coro, proto) |
| 2129 | |
| 2130 | aw = coro.__await__() |
| 2131 | try: |
| 2132 | for proto in range(pickle.HIGHEST_PROTOCOL + 1): |
| 2133 | with self.assertRaises((TypeError, pickle.PicklingError)): |
| 2134 | pickle.dumps(aw, proto) |
| 2135 | finally: |
| 2136 | aw.close() |
| 2137 | |
| 2138 | def test_fatal_coro_warning(self): |
| 2139 | # Issue 27811 |
nothing calls this directly
no test coverage detected