cpython: 81da2ed0c563 (original) (raw)
Mercurial > cpython
changeset 85706:81da2ed0c563
#18856: merge with 3.3. [#18856]
Ezio Melotti ezio.melotti@gmail.com | |
---|---|
date | Sun, 15 Sep 2013 04:05:04 +0300 |
parents | 7bf4406c972e(current diff)63b43935964f(diff) |
children | 24aa6f98fe25 |
files | |
diffstat | 1 files changed, 21 insertions(+), 0 deletions(-)[+] [-] Lib/test/test_calendar.py 21 |
line wrap: on
line diff
--- a/Lib/test/test_calendar.py +++ b/Lib/test/test_calendar.py @@ -399,6 +399,27 @@ class OutputTestCase(unittest.TestCase): '
- def test_prweek(self):
with support.captured_stdout() as out:[](#l1.8)
week = [(1,0), (2,1), (3,2), (4,3), (5,4), (6,5), (7,6)][](#l1.9)
calendar.TextCalendar().prweek(week, 1)[](#l1.10)
self.assertEqual(out.getvalue().strip(), "1 2 3 4 5 6 7")[](#l1.11)
- def test_prmonth(self):
with support.captured_stdout() as out:[](#l1.14)
calendar.TextCalendar().prmonth(2004, 1)[](#l1.15)
output = out.getvalue().strip()[](#l1.16)
self.assertEqual(output, result_2004_01_text.strip())[](#l1.17)
- def test_pryear(self):
with support.captured_stdout() as out:[](#l1.20)
calendar.TextCalendar().pryear(2004)[](#l1.21)
self.assertEqual(out.getvalue().strip(), result_2004_text.strip())[](#l1.22)
- def test_format(self):
with support.captured_stdout() as out:[](#l1.25)
calendar.format(["1", "2", "3"], colwidth=3, spacing=1)[](#l1.26)
self.assertEqual(out.getvalue().strip(), "1 2 3")[](#l1.27)
class CalendarTestCase(unittest.TestCase): def test_isleap(self):