mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-01-31 09:24:07 +03:00
Test tweaked to deal with missing usecs in BC timestamps
Probably depending on compile time options. On my test db usecs are available from PG 8.4.
This commit is contained in:
parent
531292bca5
commit
5748ae14bf
|
@ -417,7 +417,11 @@ class mxDateTimeTests(unittest.TestCase, CommonDatetimeTestsMixin):
|
||||||
from mx.DateTime import DateTime
|
from mx.DateTime import DateTime
|
||||||
value = self.execute('select (%s)::timestamp::text',
|
value = self.execute('select (%s)::timestamp::text',
|
||||||
[DateTime(-41, 1, 1, 13, 30, 29.123456)])
|
[DateTime(-41, 1, 1, 13, 30, 29.123456)])
|
||||||
self.assertEqual(value, '0042-01-01 13:30:29.123456 BC')
|
# microsecs for BC timestamps look not available in PG < 8.4
|
||||||
|
# but more likely it's determined at compile time.
|
||||||
|
self.assert_(value in (
|
||||||
|
'0042-01-01 13:30:29.123456 BC',
|
||||||
|
'0042-01-01 13:30:29 BC'), value)
|
||||||
|
|
||||||
def test_adapt_timedelta(self):
|
def test_adapt_timedelta(self):
|
||||||
from mx.DateTime import DateTimeDeltaFrom
|
from mx.DateTime import DateTimeDeltaFrom
|
||||||
|
|
Loading…
Reference in New Issue
Block a user