(self)
| 4831 | |
| 4832 | class TestAbstract(unittest.TestCase): |
| 4833 | def test_abc_implementation(self): |
| 4834 | class Ordered(abc.ABC): |
| 4835 | @abc.abstractmethod |
| 4836 | def __lt__(self, other): |
| 4837 | pass |
| 4838 | |
| 4839 | @abc.abstractmethod |
| 4840 | def __le__(self, other): |
| 4841 | pass |
| 4842 | |
| 4843 | @dataclass(order=True) |
| 4844 | class Date(Ordered): |
| 4845 | year: int |
| 4846 | month: 'Month' |
| 4847 | day: 'int' |
| 4848 | |
| 4849 | self.assertFalse(inspect.isabstract(Date)) |
| 4850 | self.assertGreater(Date(2020,12,25), Date(2020,8,31)) |
| 4851 | |
| 4852 | def test_maintain_abc(self): |
| 4853 | class A(abc.ABC): |
nothing calls this directly
no test coverage detected