Author: cito
Date: Tue Feb 9 06:00:38 2016
New Revision: 848
Log:
Fix test with time zones under Python 3
Modified:
trunk/tests/test_dbapi20.py
Modified: trunk/tests/test_dbapi20.py
==============================================================================
--- trunk/tests/test_dbapi20.py Tue Feb 9 05:51:46 2016 (r847)
+++ trunk/tests/test_dbapi20.py Tue Feb 9 06:00:38 2016 (r848)
@@ -588,9 +588,10 @@
elif n == 2: # input using type helpers
d = (dt.year, dt.month, dt.day)
t = (dt.hour, dt.minute, dt.second, dt.microsecond)
+ z = (timezone.utc,) if timezone else ()
params = [pgdb.Date(*d), pgdb.Time(*t),
- pgdb.Timestamp(*(d + t)), pgdb.Time(*t),
- pgdb.Timestamp(*(d + t))]
+ pgdb.Timestamp(*(d + t)), pgdb.Time(*(t + z)),
+ pgdb.Timestamp(*(d + t + z))]
for datestyle in ('iso', 'postgres, mdy', 'postgres, dmy',
'sql, mdy', 'sql, dmy', 'german'):
cur.execute("set datestyle to %s" % datestyle)
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo.cgi/pygresql