mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #3659: Values of string subclasses were not handled correctly when used
as bind parameters. Reviewed by Bejnamin Peterson.
This commit is contained in:
parent
d0db98fcd8
commit
6117f423c4
3 changed files with 12 additions and 14 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue