diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-12-19 15:44:48 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-12-19 15:44:48 (GMT) |
commit | 9450219b0692c9e56ddcd0dc130c995b98f9550f (patch) | |
tree | 3c7183536c870ecbb538e4162e11c950127129a7 /Lib/sqlite3 | |
parent | 0c221beed470cf5c08d8fc7fd099f5f97c801606 (diff) | |
download | cpython-9450219b0692c9e56ddcd0dc130c995b98f9550f.zip cpython-9450219b0692c9e56ddcd0dc130c995b98f9550f.tar.gz cpython-9450219b0692c9e56ddcd0dc130c995b98f9550f.tar.bz2 |
Issue #20026: Fix the sqlite module to handle correctly invalid isolation level
(wrong type).
Diffstat (limited to 'Lib/sqlite3')
-rw-r--r-- | Lib/sqlite3/test/regression.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/sqlite3/test/regression.py b/Lib/sqlite3/test/regression.py index 4c25f00..5b7759c 100644 --- a/Lib/sqlite3/test/regression.py +++ b/Lib/sqlite3/test/regression.py @@ -313,6 +313,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") |