Added regression test to check {} is also a valid string

This commit is contained in:
Daniele Varrazzo 2011-02-20 12:23:48 +00:00
parent 5ee60571a5
commit 7996333ee7
2 changed files with 4 additions and 0 deletions

1
NEWS
View File

@ -22,6 +22,7 @@ What's new in psycopg 2.4
missing encodings: EUC_CN, EUC_JIS_2004, ISO885910, ISO885916,
LATIN10, SHIFT_JIS_2004.
- Dropped repeated dictionary lookups with unicode query/parameters.
- Empty lists correctly roundtrip Python -> PostgreSQL -> Python.
* Bug fixes:

View File

@ -185,6 +185,9 @@ class TypesBasicTests(unittest.TestCase):
self.failUnlessEqual(s, [])
s = self.execute("SELECT 1 != ALL(%s)", ([],))
self.failUnlessEqual(s, True)
# but don't break the strings :)
s = self.execute("SELECT '{}'::text AS foo")
self.failUnlessEqual(s, "{}")
@testutils.skip_from_python(3)
def testTypeRoundtripBuffer(self):