mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-10 19:16:34 +03:00
Added regression test to check {} is also a valid string
This commit is contained in:
parent
5ee60571a5
commit
7996333ee7
1
NEWS
1
NEWS
|
@ -22,6 +22,7 @@ What's new in psycopg 2.4
|
||||||
missing encodings: EUC_CN, EUC_JIS_2004, ISO885910, ISO885916,
|
missing encodings: EUC_CN, EUC_JIS_2004, ISO885910, ISO885916,
|
||||||
LATIN10, SHIFT_JIS_2004.
|
LATIN10, SHIFT_JIS_2004.
|
||||||
- Dropped repeated dictionary lookups with unicode query/parameters.
|
- Dropped repeated dictionary lookups with unicode query/parameters.
|
||||||
|
- Empty lists correctly roundtrip Python -> PostgreSQL -> Python.
|
||||||
|
|
||||||
* Bug fixes:
|
* Bug fixes:
|
||||||
|
|
||||||
|
|
|
@ -185,6 +185,9 @@ class TypesBasicTests(unittest.TestCase):
|
||||||
self.failUnlessEqual(s, [])
|
self.failUnlessEqual(s, [])
|
||||||
s = self.execute("SELECT 1 != ALL(%s)", ([],))
|
s = self.execute("SELECT 1 != ALL(%s)", ([],))
|
||||||
self.failUnlessEqual(s, True)
|
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)
|
@testutils.skip_from_python(3)
|
||||||
def testTypeRoundtripBuffer(self):
|
def testTypeRoundtripBuffer(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user