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

Method test_base

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

Source from the content-addressed store, hash-verified

4371 self.assertEqual(ns, {})
4372
4373 def test_base(self):
4374 class Base1:
4375 pass
4376 class Base2:
4377 pass
4378 C = make_dataclass('C',
4379 [('x', int)],
4380 bases=(Base1, Base2))
4381 c = C(2)
4382 self.assertIsInstance(c, C)
4383 self.assertIsInstance(c, Base1)
4384 self.assertIsInstance(c, Base2)
4385
4386 def test_base_dataclass(self):
4387 @dataclass

Callers

nothing calls this directly

Calls 3

make_dataclassFunction · 0.85
assertIsInstanceMethod · 0.80
CClass · 0.70

Tested by

no test coverage detected