MCPcopy Index your code
hub / github.com/python/cpython / test_iterweekdays

Method test_iterweekdays

Lib/test/test_calendar.py:864–870  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

862 self.assertEqual(days[-1][1], (firstweekday - 1) % 7)
863
864 def test_iterweekdays(self):
865 week0 = list(range(7))
866 for firstweekday in range(7):
867 cal = calendar.Calendar(firstweekday)
868 week = list(cal.iterweekdays())
869 expected = week0[firstweekday:] + week0[:firstweekday]
870 self.assertEqual(week, expected)
871
872
873class MonthCalendarTestCase(unittest.TestCase):

Callers

nothing calls this directly

Calls 3

iterweekdaysMethod · 0.95
listClass · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected