(self)
| 9726 | self.assertEqual(MyCount[int]([4, 4, 5]), {4: 2, 5: 1}) |
| 9727 | |
| 9728 | def test_instantiate_immutable(self): |
| 9729 | class C: |
| 9730 | def __setattr__(self, key, value): |
| 9731 | raise Exception("should be ignored") |
| 9732 | |
| 9733 | A = Annotated[C, "a decoration"] |
| 9734 | # gh-115165: This used to cause RuntimeError to be raised |
| 9735 | # when we tried to set `__orig_class__` on the `C` instance |
| 9736 | # returned by the `A()` call |
| 9737 | self.assertIsInstance(A(), C) |
| 9738 | |
| 9739 | def test_cannot_instantiate_forward(self): |
| 9740 | A = Annotated["int", (5, 6)] |
nothing calls this directly
no test coverage detected