[Python-checkins] r75410 - python/trunk/Lib/test/test_calendar.py
antoine.pitrou
python-checkins at python.org
Wed Oct 14 20:09:45 CEST 2009
Author: antoine.pitrou
Date: Wed Oct 14 20:09:45 2009
New Revision: 75410
Log:
Silence a py3k warning claiming to affect Lib/calendar.py
Modified:
python/trunk/Lib/test/test_calendar.py
Modified: python/trunk/Lib/test/test_calendar.py
==============================================================================
--- python/trunk/Lib/test/test_calendar.py (original)
+++ python/trunk/Lib/test/test_calendar.py Wed Oct 14 20:09:45 2009
@@ -212,9 +212,11 @@
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)
More information about the Python-checkins
mailing list