summaryrefslogtreecommitdiffstats
path: root/Lib/test/audit-tests.py
diff options
context:
space:
mode:
authorErlend Egeberg Aasland <erlend.aasland@innova.no>2021-05-02 21:25:17 (GMT)
committerGitHub <noreply@github.com>2021-05-02 21:25:17 (GMT)
commitc96cc089f60d2bf7e003c27413c3239ee9de2990 (patch)
treed93d46ef410fdda18eab4d3a75cc55af541387e9 /Lib/test/audit-tests.py
parent37e0c7850de902179b28f1378fbbc38a5ed3628c (diff)
downloadcpython-c96cc089f60d2bf7e003c27413c3239ee9de2990.zip
cpython-c96cc089f60d2bf7e003c27413c3239ee9de2990.tar.gz
cpython-c96cc089f60d2bf7e003c27413c3239ee9de2990.tar.bz2
bpo-43434: Move sqlite3.connect audit events to sqlite3.Connection.__init__ (GH-25818)
Diffstat (limited to 'Lib/test/audit-tests.py')
-rw-r--r--Lib/test/audit-tests.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/audit-tests.py b/Lib/test/audit-tests.py
index ed42451..7a7de63 100644
--- a/Lib/test/audit-tests.py
+++ b/Lib/test/audit-tests.py
@@ -367,13 +367,14 @@ def test_sqlite3():
print(event, *args)
sys.addaudithook(hook)
- cx = sqlite3.connect(":memory:")
+ cx1 = sqlite3.connect(":memory:")
+ cx2 = sqlite3.Connection(":memory:")
# Configured without --enable-loadable-sqlite-extensions
if hasattr(sqlite3.Connection, "enable_load_extension"):
- cx.enable_load_extension(False)
+ cx1.enable_load_extension(False)
try:
- cx.load_extension("test")
+ cx1.load_extension("test")
except sqlite3.OperationalError:
pass
else: