From 3638d349ba4cc8f321015dfa427f2e873116c9dc Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Wed, 1 Mar 2017 00:44:28 +0000 Subject: [PATCH] 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 --- tests/test_dates.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_dates.py b/tests/test_dates.py index 9b719056..98b1f555 100755 --- a/tests/test_dates.py +++ b/tests/test_dates.py @@ -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)