diff options
Diffstat (limited to 'Lib/sqlite3')
-rw-r--r-- | Lib/sqlite3/test/regression.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/Lib/sqlite3/test/regression.py b/Lib/sqlite3/test/regression.py index 5e89a6c..433cae2 100644 --- a/Lib/sqlite3/test/regression.py +++ b/Lib/sqlite3/test/regression.py @@ -146,7 +146,8 @@ class RegressionTests(unittest.TestCase): # decoding errors disappeared. This verifies they're back again. failure = None try: - self.con.execute("select 'xxx' || ? || 'yyy' colname", (bytes(bytearray([250])),)).fetchone() + self.con.execute("select 'xxx' || ? || 'yyy' colname", + (bytes(bytearray([250])),)).fetchone() failure = "should have raised an OperationalError with detailed description" except sqlite.OperationalError as e: msg = e.args[0] @@ -155,6 +156,20 @@ class RegressionTests(unittest.TestCase): if failure: self.fail(failure) + def CheckRegisterAdapter(self): + """ + See issue 3312. + """ + self.assertRaises(TypeError, sqlite.register_adapter, {}, None) + + def CheckSetIsolationLevel(self): + """ + See issue 3312. + """ + con = sqlite.connect(":memory:") + setattr(con, "isolation_level", "\xe9") + + def suite(): regression_suite = unittest.makeSuite(RegressionTests, "Check") return unittest.TestSuite((regression_suite,)) |