Mercurial > cpython-lru_cache-weakref
changeset 56519:cdcd805eee85 legacy-trunk
Silence a py3k warning claiming to affect Lib/calendar.py
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Wed, 14 Oct 2009 18:09:45 +0000 |
| parents | 386a4d7c3c99 |
| children | e8532cc8a14e |
| files | Lib/test/test_calendar.py |
| diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Lib/test/test_calendar.py Wed Oct 14 18:01:33 2009 +0000 +++ b/Lib/test/test_calendar.py Wed Oct 14 18:09:45 2009 +0000 @@ -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)
