(self)
| 2213 | self.assertEqual(sample.y, another_new_sample.y) |
| 2214 | |
| 2215 | def test_dataclasses_qualnames(self): |
| 2216 | @dataclass(order=True, unsafe_hash=True, frozen=True) |
| 2217 | class A: |
| 2218 | x: int |
| 2219 | y: int |
| 2220 | |
| 2221 | self.assertEqual(A.__init__.__name__, "__init__") |
| 2222 | for function in ( |
| 2223 | '__eq__', |
| 2224 | '__lt__', |
| 2225 | '__le__', |
| 2226 | '__gt__', |
| 2227 | '__ge__', |
| 2228 | '__hash__', |
| 2229 | '__init__', |
| 2230 | '__repr__', |
| 2231 | '__setattr__', |
| 2232 | '__delattr__', |
| 2233 | ): |
| 2234 | self.assertEqual(getattr(A, function).__qualname__, f"TestCase.test_dataclasses_qualnames.<locals>.A.{function}") |
| 2235 | |
| 2236 | with self.assertRaisesRegex(TypeError, r"A\.__init__\(\) missing"): |
| 2237 | A() |
| 2238 | |
| 2239 | |
| 2240 | class TestFieldNoAnnotation(unittest.TestCase): |
nothing calls this directly
no test coverage detected