(self)
| 9702 | hash(a2) |
| 9703 | |
| 9704 | def test_instantiate(self): |
| 9705 | class C: |
| 9706 | classvar = 4 |
| 9707 | |
| 9708 | def __init__(self, x): |
| 9709 | self.x = x |
| 9710 | |
| 9711 | def __eq__(self, other): |
| 9712 | if not isinstance(other, C): |
| 9713 | return NotImplemented |
| 9714 | return other.x == self.x |
| 9715 | |
| 9716 | A = Annotated[C, "a decoration"] |
| 9717 | a = A(5) |
| 9718 | c = C(5) |
| 9719 | self.assertEqual(a, c) |
| 9720 | self.assertEqual(a.x, c.x) |
| 9721 | self.assertEqual(a.classvar, c.classvar) |
| 9722 | |
| 9723 | def test_instantiate_generic(self): |
| 9724 | MyCount = Annotated[typing.Counter[T], "my decoration"] |
nothing calls this directly
no test coverage detected