mirror of
https://github.com/python/cpython.git
synced 2025-09-15 05:06:12 +00:00
#3312: fix two sqlite3 crashes.
This commit is contained in:
parent
4ed9be733b
commit
a24869ada7
4 changed files with 29 additions and 3 deletions
|
@ -153,6 +153,20 @@ class RegressionTests(unittest.TestCase):
|
|||
con.execute("insert into foo(bar) values (5)")
|
||||
con.execute(SELECT)
|
||||
|
||||
def CheckRegisterAdapter(self):
|
||||
"""
|
||||
See issue 3312.
|
||||
"""
|
||||
self.assertRaises(TypeError, sqlite.register_adapter, {}, None)
|
||||
|
||||
def CheckSetIsolationLevel(self):
|
||||
"""
|
||||
See issue 3312.
|
||||
"""
|
||||
con = sqlite.connect(":memory:")
|
||||
self.assertRaises(UnicodeEncodeError, setattr, con,
|
||||
"isolation_level", u"\xe9")
|
||||
|
||||
|
||||
def suite():
|
||||
regression_suite = unittest.makeSuite(RegressionTests, "Check")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue