From 77df287e14123ba610854441dd32f7012d574b74 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sun, 8 Feb 2015 12:50:02 +0000 Subject: [PATCH] More tests tweaks Named cursors on old server versions have a different prefetch behaviour. This has hidden me the supported range of the 24:00 time format. Let's have another go at full testing... --- tests/test_dates.py | 2 +- tests/test_with.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_dates.py b/tests/test_dates.py index a99cc01f..832221f5 100755 --- a/tests/test_dates.py +++ b/tests/test_dates.py @@ -309,7 +309,7 @@ class DatetimeTests(ConnectingTestCase, CommonDatetimeTestsMixin): from datetime import timedelta self._test_type_roundtrip_array(timedelta(seconds=30)) - @skip_before_postgres(8, 4) + @skip_before_postgres(8, 1) def test_time_24(self): from datetime import time diff --git a/tests/test_with.py b/tests/test_with.py index 13e4d7ef..2f018fc8 100755 --- a/tests/test_with.py +++ b/tests/test_with.py @@ -207,6 +207,7 @@ class WithCursorTestCase(WithTestCase): with self.conn as conn: with conn.cursor('named') as cur: cur.execute("select 1/0") + cur.fetchone() except psycopg2.DataError, e: self.assertEqual(e.pgcode, '22012') else: