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