summaryrefslogtreecommitdiff
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/audit-tests.py7
-rw-r--r--Lib/test/test_audit.py2
2 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/audit-tests.py b/Lib/test/audit-tests.py
index ed42451b8f..7a7de637c3 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:
diff --git a/Lib/test/test_audit.py b/Lib/test/test_audit.py
index 4ba62c4085..25ff34bb11 100644
--- a/Lib/test/test_audit.py
+++ b/Lib/test/test_audit.py
@@ -158,7 +158,7 @@ class AuditTest(unittest.TestCase):
if support.verbose:
print(*events, sep='\n')
actual = [ev[0] for ev in events]
- expected = ["sqlite3.connect", "sqlite3.connect/handle"]
+ expected = ["sqlite3.connect", "sqlite3.connect/handle"] * 2
if hasattr(sqlite3.Connection, "enable_load_extension"):
expected += [