Changeset 883 for trunk/tests


Ignore:
Timestamp:
Aug 10, 2016, 9:57:50 AM (3 years ago)
Author:
cito
Message:

Fix issue with adaptation of empty arrays in pg

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/test_classic_dbwrapper.py

    r881 r883  
    929929        r = q.getresult()[0][0]
    930930        self.assertEqual(r, 'alphabetagammadeltaepsilon')
     931
     932    def testQueryFormattedWithAny(self):
     933        f = self.db.query_formatted
     934        q = "select 2 = any(%s)"
     935        r = f(q, [[1, 3]]).getresult()[0][0]
     936        self.assertEqual(r, False if pg.get_bool() else 'f')
     937        r = f(q, [[1, 2, 3]]).getresult()[0][0]
     938        self.assertEqual(r, True if pg.get_bool() else 't')
     939        r = f(q, [[]]).getresult()[0][0]
     940        self.assertEqual(r, False if pg.get_bool() else 'f')
     941        r = f(q, [[None]]).getresult()[0][0]
     942        self.assertIsNone(r)
    931943
    932944    def testPkey(self):
Note: See TracChangeset for help on using the changeset viewer.