Issue #20026: Fix the sqlite module to handle correctly invalid isolation level

(wrong type).
This commit is contained in:
Victor Stinner 2013-12-19 16:38:03 +01:00
parent cac23a50ee
commit cb1f74ec40
3 changed files with 12 additions and 1 deletions

View file

@ -330,6 +330,11 @@ class RegressionTests(unittest.TestCase):
datetime.datetime(2012, 4, 4, 15, 6, 0, 123456),
])
def CheckInvalidIsolationLevelType(self):
# isolation level is a string, not an integer
self.assertRaises(TypeError,
sqlite.connect, ":memory:", isolation_level=123)
def suite():
regression_suite = unittest.makeSuite(RegressionTests, "Check")