(self)
| 1597 | self.assertEqual(fields(C), fields(C(0, 0.0))) |
| 1598 | |
| 1599 | def test_helper_fields_exception(self): |
| 1600 | # Check that TypeError is raised if not passed a dataclass or |
| 1601 | # instance. |
| 1602 | with self.assertRaisesRegex(TypeError, 'dataclass type or instance'): |
| 1603 | fields(0) |
| 1604 | |
| 1605 | class C: pass |
| 1606 | with self.assertRaisesRegex(TypeError, 'dataclass type or instance'): |
| 1607 | fields(C) |
| 1608 | with self.assertRaisesRegex(TypeError, 'dataclass type or instance'): |
| 1609 | fields(C()) |
| 1610 | |
| 1611 | def test_clean_traceback_from_fields_exception(self): |
| 1612 | stdout = io.StringIO() |
nothing calls this directly
no test coverage detected