Changeset 839 for trunk/tests


Ignore:
Timestamp:
Feb 8, 2016, 11:00:17 AM (4 years ago)
Author:
cito
Message:

Cast to proper type when adapting datetime values

Otherwise PostgreSQL needs to guess the type from the context
which is not always possible.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/test_dbapi20.py

    r823 r839  
    558558                        'sql, mdy', 'sql, dmy', 'german'):
    559559                    cur.execute("set datestyle to %s" % datestyle)
     560                    if n != 1:
     561                        cur.execute("select %s,%s,%s,%s,%s", params)
     562                        row = cur.fetchone()
     563                        self.assertEqual(row, tuple(values))
    560564                    cur.execute("insert into %s"
    561565                        " values (%%s,%%s,%%s,%%s,%%s)" % table, params)
Note: See TracChangeset for help on using the changeset viewer.