MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_base

Method test_base

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

make_dataclassFunction · 0.85
assertIsInstanceMethod · 0.80
CClass · 0.70

Tested by

no test coverage detected