diff --git a/Lib/sqlite3/test/dbapi.py b/Lib/sqlite3/test/dbapi.py index 02e42e8c3751f1..89f773daf24a16 100644 --- a/Lib/sqlite3/test/dbapi.py +++ b/Lib/sqlite3/test/dbapi.py @@ -880,6 +880,13 @@ def test_cursor_executescript_too_large_script(self, maxsize): with self.assertRaises(sqlite.DataError): cur.executescript("create table a(s);".ljust(size)) + def test_cursor_executescript_tx_control(self): + con = sqlite.connect(":memory:") + con.execute("begin") + self.assertTrue(con.in_transaction) + con.executescript("select 1") + self.assertFalse(con.in_transaction) + def test_connection_execute(self): con = sqlite.connect(":memory:") result = con.execute("select 5").fetchone()[0]