summaryrefslogtreecommitdiffstats
path: root/Lib/sqlite3/test/transactions.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/sqlite3/test/transactions.py')
-rw-r--r--Lib/sqlite3/test/transactions.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/sqlite3/test/transactions.py b/Lib/sqlite3/test/transactions.py
index 45f1b04..b8a13de 100644
--- a/Lib/sqlite3/test/transactions.py
+++ b/Lib/sqlite3/test/transactions.py
@@ -179,6 +179,15 @@ class TransactionalDDL(unittest.TestCase):
result = self.con.execute("select * from test").fetchall()
self.assertEqual(result, [])
+ def CheckImmediateTransactionalDDL(self):
+ # You can achieve transactional DDL by issuing a BEGIN
+ # statement manually.
+ self.con.execute("begin immediate")
+ self.con.execute("create table test(i)")
+ self.con.rollback()
+ with self.assertRaises(sqlite.OperationalError):
+ self.con.execute("select * from test")
+
def CheckTransactionalDDL(self):
# You can achieve transactional DDL by issuing a BEGIN
# statement manually.