MCPcopy Index your code
hub / github.com/python/cpython / test_dict

Method test_dict

Lib/test/test_typing.py:4940–4955  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4938 repr(C.__mro__)
4939
4940 def test_dict(self):
4941 T = TypeVar('T')
4942
4943 class B(Generic[T]):
4944 pass
4945
4946 b = B()
4947 b.foo = 42
4948 self.assertEqual(b.__dict__, {'foo': 42})
4949
4950 class C(B[int]):
4951 pass
4952
4953 c = C()
4954 c.bar = 'abc'
4955 self.assertEqual(c.__dict__, {'bar': 'abc'})
4956
4957 def test_setattr_exceptions(self):
4958 class Immutable[T]:

Callers

nothing calls this directly

Calls 3

BClass · 0.70
CClass · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected