Skip test on PG version with bad interval rounding

On these ancient versions:

    =# select '999999:00:00.1'::interval;
                interval
    --------------------------------
     41666 days 15:00:00.0999999046
This commit is contained in:
Daniele Varrazzo 2017-03-01 00:44:28 +00:00
parent 691df4952b
commit 3638d349ba

View File

@ -338,6 +338,7 @@ class DatetimeTests(ConnectingTestCase, CommonDatetimeTestsMixin):
t = self.execute("select '24:00+05:30'::timetz;")
self.assertEqual(t, time(0, 0, tzinfo=FixedOffsetTimezone(330)))
@skip_before_postgres(8, 1)
def test_large_interval(self):
t = self.execute("select '999999:00:00'::interval")
self.assertEqual(total_seconds(t), 999999 * 60 * 60)