summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-10-14 18:09:45 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2009-10-14 18:09:45 (GMT)
commite22997ec7c507423f597474c75d2459e5b30b063 (patch)
tree927228ffae75e0d04bc7dc81def3f844bc826381
parent63b0cb2f39e26be7f6b636ddd40cc8d6a1400d51 (diff)
downloadcpython-e22997ec7c507423f597474c75d2459e5b30b063.zip
cpython-e22997ec7c507423f597474c75d2459e5b30b063.tar.gz
cpython-e22997ec7c507423f597474c75d2459e5b30b063.tar.bz2
Silence a py3k warning claiming to affect Lib/calendar.py
-rw-r--r--Lib/test/test_calendar.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/test/test_calendar.py b/Lib/test/test_calendar.py
index fad517c..39d4fe8 100644
--- a/Lib/test/test_calendar.py
+++ b/Lib/test/test_calendar.py
@@ -212,9 +212,11 @@ class CalendarTestCase(unittest.TestCase):
self.assertEqual(calendar.isleap(2003), 0)
def test_setfirstweekday(self):
- self.assertRaises(ValueError, calendar.setfirstweekday, 'flabber')
- self.assertRaises(ValueError, calendar.setfirstweekday, -1)
- self.assertRaises(ValueError, calendar.setfirstweekday, 200)
+ # Silence a py3k warning claiming to affect Lib/calendar.py
+ with test_support.check_warnings():
+ self.assertRaises(ValueError, calendar.setfirstweekday, 'flabber')
+ self.assertRaises(ValueError, calendar.setfirstweekday, -1)
+ self.assertRaises(ValueError, calendar.setfirstweekday, 200)
orig = calendar.firstweekday()
calendar.setfirstweekday(calendar.SUNDAY)
self.assertEqual(calendar.firstweekday(), calendar.SUNDAY)