(self)
| 4384 | self.assertIsInstance(c, Base2) |
| 4385 | |
| 4386 | def test_base_dataclass(self): |
| 4387 | @dataclass |
| 4388 | class Base1: |
| 4389 | x: int |
| 4390 | class Base2: |
| 4391 | pass |
| 4392 | C = make_dataclass('C', |
| 4393 | [('y', int)], |
| 4394 | bases=(Base1, Base2)) |
| 4395 | with self.assertRaisesRegex(TypeError, 'required positional'): |
| 4396 | c = C(2) |
| 4397 | c = C(1, 2) |
| 4398 | self.assertIsInstance(c, C) |
| 4399 | self.assertIsInstance(c, Base1) |
| 4400 | self.assertIsInstance(c, Base2) |
| 4401 | |
| 4402 | self.assertEqual((c.x, c.y), (1, 2)) |
| 4403 | |
| 4404 | def test_init_var(self): |
| 4405 | def post_init(self, y): |
nothing calls this directly
no test coverage detected