(self)
| 1256 | self.assertEqual(c.t, 3000) |
| 1257 | |
| 1258 | def test_init_var_no_default(self): |
| 1259 | # If an InitVar has no default value, it should not be set on the class. |
| 1260 | @dataclass |
| 1261 | class C: |
| 1262 | x: InitVar[int] |
| 1263 | |
| 1264 | self.assertNotIn('x', C.__dict__) |
| 1265 | |
| 1266 | def test_init_var_default_factory(self): |
| 1267 | # It makes no sense for an InitVar to have a default factory. When |
nothing calls this directly
no test coverage detected