[Python-checkins] cpython (merge 3.3 -> 3.3): Merge heads.

ezio.melotti python-checkins at python.org
Sun Sep 15 03:07:29 CEST 2013


http://hg.python.org/cpython/rev/63b43935964f
changeset:   85705:63b43935964f
branch:      3.3
parent:      85698:7c18b799841e
parent:      85704:442e23bbec48
user:        Ezio Melotti <ezio.melotti at gmail.com>
date:        Sun Sep 15 03:00:42 2013 +0300
summary:
  Merge heads.

files:
  Lib/test/test_calendar.py |  21 +++++++++++++++++++++
  1 files changed, 21 insertions(+), 0 deletions(-)


diff --git a/Lib/test/test_calendar.py b/Lib/test/test_calendar.py
--- a/Lib/test/test_calendar.py
+++ b/Lib/test/test_calendar.py
@@ -399,6 +399,27 @@
             '<tr><th colspan="7" class="month">January</th></tr>'
         )
 
+    def test_prweek(self):
+        with support.captured_stdout() as out:
+            week = [(1,0), (2,1), (3,2), (4,3), (5,4), (6,5), (7,6)]
+            calendar.TextCalendar().prweek(week, 1)
+            self.assertEqual(out.getvalue().strip(), "1  2  3  4  5  6  7")
+
+    def test_prmonth(self):
+        with support.captured_stdout() as out:
+            calendar.TextCalendar().prmonth(2004, 1)
+            output = out.getvalue().strip()
+            self.assertEqual(output, result_2004_01_text.strip())
+
+    def test_pryear(self):
+        with support.captured_stdout() as out:
+            calendar.TextCalendar().pryear(2004)
+            self.assertEqual(out.getvalue().strip(), result_2004_text.strip())
+
+    def test_format(self):
+        with support.captured_stdout() as out:
+            calendar.format(["1", "2", "3"], colwidth=3, spacing=1)
+            self.assertEqual(out.getvalue().strip(), "1   2   3")
 
 class CalendarTestCase(unittest.TestCase):
     def test_isleap(self):

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list