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

Method test_itermonthdays2

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

Source from the content-addressed store, hash-verified

853 self.assertEqual(days, list(range(1, 29)))
854
855 def test_itermonthdays2(self):
856 for firstweekday in range(7):
857 cal = calendar.Calendar(firstweekday)
858 # Test the extremes, see #28253 and #26650
859 for y, m in [(1, 1), (9999, 12)]:
860 days = list(cal.itermonthdays2(y, m))
861 self.assertEqual(days[0][1], firstweekday)
862 self.assertEqual(days[-1][1], (firstweekday - 1) % 7)
863
864 def test_iterweekdays(self):
865 week0 = list(range(7))

Callers

nothing calls this directly

Calls 3

itermonthdays2Method · 0.95
listClass · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected