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

Method test_field_named_object

Lib/test/test_dataclasses/__init__.py:274–279  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

272 self.assertEqual('self', first)
273
274 def test_field_named_object(self):
275 @dataclass
276 class C:
277 object: str
278 c = C('foo')
279 self.assertEqual(c.object, 'foo')
280
281 def test_field_named_object_frozen(self):
282 @dataclass(frozen=True)

Callers

nothing calls this directly

Calls 2

assertEqualMethod · 0.95
CClass · 0.70

Tested by

no test coverage detected