]> granicus.if.org Git - python/commitdiff
Fix test_time under Windows
authorAntoine Pitrou <solipsis@pitrou.net>
Tue, 4 Jan 2011 22:54:30 +0000 (22:54 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Tue, 4 Jan 2011 22:54:30 +0000 (22:54 +0000)
Lib/test/test_time.py

index f2ce5cb1512f59d736599c8448f293d1281da044..6eb0953a4885e2bbe866bccebb777fc587430e28 100644 (file)
@@ -124,7 +124,7 @@ class TimeTestCase(unittest.TestCase):
         time.asctime(time.gmtime(self.t))
 
         # Max year is only limited by the size of C int.
-        sizeof_int = sysconfig.get_config_vars('SIZEOF_INT')[0]
+        sizeof_int = sysconfig.get_config_var('SIZEOF_INT') or 4
         bigyear = (1 << 8 * sizeof_int - 1) - 1
         asc = time.asctime((bigyear, 6, 1) + (0,)*6)
         self.assertEqual(asc[-len(str(bigyear)):], str(bigyear))