Silence a py3k warning claiming to affect Lib/calendar.py

This commit is contained in:
Antoine Pitrou 2009-10-14 18:09:45 +00:00
parent 63b0cb2f39
commit e22997ec7c
1 changed files with 5 additions and 3 deletions

View File

@ -212,6 +212,8 @@ class CalendarTestCase(unittest.TestCase):
self.assertEqual(calendar.isleap(2003), 0)
def test_setfirstweekday(self):
# 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)