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...
This commit is contained in:
Daniele Varrazzo 2015-02-08 12:50:02 +00:00
parent 7ea56b112e
commit 296caa4556
2 changed files with 2 additions and 1 deletions

View File

@ -319,7 +319,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

View File

@ -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: