aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_sqlite3/test_regression.py
diff options
context:
space:
mode:
authorErlend Egeberg Aasland <erlend.aasland@innova.no>2022-01-03 20:02:39 +0100
committerGitHub <noreply@github.com>2022-01-03 19:02:39 +0000
commit9d6a239a34a66e16188d76c23a3a770515ca44ca (patch)
tree254afa367df14a95548df952452285de93cb37a3 /Lib/test/test_sqlite3/test_regression.py
parent9d35dedc5e7e940b639230fba93c763bd9f19c09 (diff)
downloadcpython-9d6a239a34a66e16188d76c23a3a770515ca44ca.tar.gz
cpython-9d6a239a34a66e16188d76c23a3a770515ca44ca.zip
bpo-44092: Don't reset statements/cursors before rollback (GH-26026)
In SQLite versions pre 3.7.11, pending statements would block a rollback. This is no longer the case, so remove the workaround.
Diffstat (limited to 'Lib/test/test_sqlite3/test_regression.py')
-rw-r--r--Lib/test/test_sqlite3/test_regression.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/Lib/test/test_sqlite3/test_regression.py b/Lib/test/test_sqlite3/test_regression.py
index eb34069d3e5..b527053039b 100644
--- a/Lib/test/test_sqlite3/test_regression.py
+++ b/Lib/test/test_sqlite3/test_regression.py
@@ -231,28 +231,6 @@ class RegressionTests(unittest.TestCase):
with self.assertRaises(sqlite.ProgrammingError):
cur = con.cursor()
- def test_cursor_registration(self):
- """
- Verifies that subclassed cursor classes are correctly registered with
- the connection object, too. (fetch-across-rollback problem)
- """
- class Connection(sqlite.Connection):
- def cursor(self):
- return Cursor(self)
-
- class Cursor(sqlite.Cursor):
- def __init__(self, con):
- sqlite.Cursor.__init__(self, con)
-
- con = Connection(":memory:")
- cur = con.cursor()
- cur.execute("create table foo(x)")
- cur.executemany("insert into foo(x) values (?)", [(3,), (4,), (5,)])
- cur.execute("select x from foo")
- con.rollback()
- with self.assertRaises(sqlite.InterfaceError):
- cur.fetchall()
-
def test_auto_commit(self):
"""
Verifies that creating a connection in autocommit mode works.