File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
graalpython/lib-python/3/test Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1818
1919# Max year is only limited by the size of C int.
2020SIZEOF_INT = sysconfig .get_config_var ('SIZEOF_INT' ) or 4
21- TIME_MAXYEAR = (1 << 8 * SIZEOF_INT - 1 ) - 1
22- TIME_MINYEAR = - TIME_MAXYEAR - 1 + 1900
21+ # XXX GRAALVM change - jdk MAX/MIN_YEAR limitation
22+ #TIME_MAXYEAR = (1 << 8 * SIZEOF_INT - 1) - 1
23+ #TIME_MINYEAR = -TIME_MAXYEAR - 1 + 1900
24+ TIME_MAXYEAR = 999999999 #(1 << 8 * SIZEOF_INT - 1) - 1
25+ TIME_MINYEAR = - 999999999 #-TIME_MAXYEAR - 1 + 1900
2326
2427SEC_TO_US = 10 ** 6
2528US_TO_NS = 10 ** 3
@@ -660,7 +663,8 @@ def test_negative(self):
660663 self .assertEqual (self .yearstr (- 1234 ), '-1234' )
661664 self .assertEqual (self .yearstr (- 123456 ), '-123456' )
662665 self .assertEqual (self .yearstr (- 123456789 ), str (- 123456789 ))
663- self .assertEqual (self .yearstr (- 1234567890 ), str (- 1234567890 ))
666+ # XXX GRAALVM change - jdk MAX/MIN_YEAR limitation
667+ # self.assertEqual(self.yearstr(-1234567890), str(-1234567890))
664668 self .assertEqual (self .yearstr (TIME_MINYEAR ), str (TIME_MINYEAR ))
665669 # Modules/timemodule.c checks for underflow
666670 self .assertRaises (OverflowError , self .yearstr , TIME_MINYEAR - 1 )
You can’t perform that action at this time.
0 commit comments