(self)
| 127 | self.assertEqual(a, {}) |
| 128 | |
| 129 | def test_context_run_3(self): |
| 130 | ctx = contextvars.Context() |
| 131 | |
| 132 | def func(*args, **kwargs): |
| 133 | 1 / 0 |
| 134 | |
| 135 | with self.assertRaises(ZeroDivisionError): |
| 136 | ctx.run(func) |
| 137 | with self.assertRaises(ZeroDivisionError): |
| 138 | ctx.run(func, 1, 2) |
| 139 | with self.assertRaises(ZeroDivisionError): |
| 140 | ctx.run(func, 1, 2, a=123) |
| 141 | |
| 142 | @isolated_context |
| 143 | def test_context_run_4(self): |