summaryrefslogtreecommitdiffstats
path: root/Lib/sqlite3
diff options
context:
space:
mode:
authorGerhard Häring <gh@ghaering.de>2008-09-22 06:04:51 (GMT)
committerGerhard Häring <gh@ghaering.de>2008-09-22 06:04:51 (GMT)
commit6117f423c4754a4626c99eb3998db7282b1aa36b (patch)
tree89c5234711a5c8bd6c239f8189ffe4cefa0948c3 /Lib/sqlite3
parentd0db98fcd869605f28dc600bfeba032565e31855 (diff)
downloadcpython-6117f423c4754a4626c99eb3998db7282b1aa36b.zip
cpython-6117f423c4754a4626c99eb3998db7282b1aa36b.tar.gz
cpython-6117f423c4754a4626c99eb3998db7282b1aa36b.tar.bz2
Issue #3659: Values of string subclasses were not handled correctly when used
as bind parameters. Reviewed by Bejnamin Peterson.
Diffstat (limited to 'Lib/sqlite3')
-rw-r--r--Lib/sqlite3/test/regression.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/sqlite3/test/regression.py b/Lib/sqlite3/test/regression.py
index 433cae2..d056aae 100644
--- a/Lib/sqlite3/test/regression.py
+++ b/Lib/sqlite3/test/regression.py
@@ -169,6 +169,12 @@ class RegressionTests(unittest.TestCase):
con = sqlite.connect(":memory:")
setattr(con, "isolation_level", "\xe9")
+ def CheckStrSubclass(self):
+ """
+ The Python 3.0 port of the module didn't cope with values of subclasses of str.
+ """
+ class MyStr(str): pass
+ self.con.execute("select ?", (MyStr("abc"),))
def suite():
regression_suite = unittest.makeSuite(RegressionTests, "Check")