diff options
author | Gerhard Häring <gh@ghaering.de> | 2008-09-22 06:04:51 (GMT) |
---|---|---|
committer | Gerhard Häring <gh@ghaering.de> | 2008-09-22 06:04:51 (GMT) |
commit | 6117f423c4754a4626c99eb3998db7282b1aa36b (patch) | |
tree | 89c5234711a5c8bd6c239f8189ffe4cefa0948c3 /Lib | |
parent | d0db98fcd869605f28dc600bfeba032565e31855 (diff) | |
download | cpython-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')
-rw-r--r-- | Lib/sqlite3/test/regression.py | 6 |
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") |