mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-25 18:33:44 +03:00
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:
parent
a2a5461c28
commit
77df287e14
|
@ -309,7 +309,7 @@ class DatetimeTests(ConnectingTestCase, CommonDatetimeTestsMixin):
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
self._test_type_roundtrip_array(timedelta(seconds=30))
|
self._test_type_roundtrip_array(timedelta(seconds=30))
|
||||||
|
|
||||||
@skip_before_postgres(8, 4)
|
@skip_before_postgres(8, 1)
|
||||||
def test_time_24(self):
|
def test_time_24(self):
|
||||||
from datetime import time
|
from datetime import time
|
||||||
|
|
||||||
|
|
|
@ -207,6 +207,7 @@ class WithCursorTestCase(WithTestCase):
|
||||||
with self.conn as conn:
|
with self.conn as conn:
|
||||||
with conn.cursor('named') as cur:
|
with conn.cursor('named') as cur:
|
||||||
cur.execute("select 1/0")
|
cur.execute("select 1/0")
|
||||||
|
cur.fetchone()
|
||||||
except psycopg2.DataError, e:
|
except psycopg2.DataError, e:
|
||||||
self.assertEqual(e.pgcode, '22012')
|
self.assertEqual(e.pgcode, '22012')
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user