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 18
18
19
19
# Max year is only limited by the size of C int.
20
20
SIZEOF_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
23
26
24
27
SEC_TO_US = 10 ** 6
25
28
US_TO_NS = 10 ** 3
@@ -660,7 +663,8 @@ def test_negative(self):
660
663
self .assertEqual (self .yearstr (- 1234 ), '-1234' )
661
664
self .assertEqual (self .yearstr (- 123456 ), '-123456' )
662
665
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))
664
668
self .assertEqual (self .yearstr (TIME_MINYEAR ), str (TIME_MINYEAR ))
665
669
# Modules/timemodule.c checks for underflow
666
670
self .assertRaises (OverflowError , self .yearstr , TIME_MINYEAR - 1 )
You can’t perform that action at this time.
0 commit comments