(self)
| 4866 | self.assertNotEqual(SA(3), SA(2)) |
| 4867 | |
| 4868 | def testWeekdayEqualitySubclass(self): |
| 4869 | # Two weekday objects equal if their "weekday" and "n" attributes are |
| 4870 | # available and the same |
| 4871 | class BasicWeekday: |
| 4872 | def __init__(self, weekday): |
| 4873 | self.weekday = weekday |
| 4874 | |
| 4875 | class BasicNWeekday(BasicWeekday): |
| 4876 | def __init__(self, weekday, n=None): |
| 4877 | super().__init__(weekday) |
| 4878 | self.n = n |
| 4879 | |
| 4880 | MO_Basic = BasicWeekday(0) |
| 4881 | |
| 4882 | self.assertNotEqual(MO, MO_Basic) |
| 4883 | self.assertNotEqual(MO(1), MO_Basic) |
| 4884 | |
| 4885 | TU_BasicN = BasicNWeekday(1) |
| 4886 | |
| 4887 | self.assertEqual(TU, TU_BasicN) |
| 4888 | self.assertNotEqual(TU(3), TU_BasicN) |
| 4889 | |
| 4890 | WE_Basic3 = BasicNWeekday(2, 3) |
| 4891 | self.assertEqual(WE(3), WE_Basic3) |
| 4892 | self.assertNotEqual(WE(2), WE_Basic3) |
| 4893 | |
| 4894 | def testWeekdayReprNoN(self): |
| 4895 | no_n_reprs = ('MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU') |
nothing calls this directly
no test coverage detected