mirror of
https://github.com/python/cpython.git
synced 2025-07-23 19:25:40 +00:00
gh-95291: Use import helper to improve sqlite3 audit tests (GH-95292) (GH-95293)
Now the tests are correctly reported as skipped if sqlite3 is not available.
(cherry picked from commit 152eb90311
)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
This commit is contained in:
parent
7df3a1ce4b
commit
c72940a609
1 changed files with 1 additions and 4 deletions
|
@ -155,10 +155,7 @@ class AuditTest(unittest.TestCase):
|
||||||
|
|
||||||
|
|
||||||
def test_sqlite3(self):
|
def test_sqlite3(self):
|
||||||
try:
|
sqlite3 = import_helper.import_module("sqlite3")
|
||||||
import sqlite3
|
|
||||||
except ImportError:
|
|
||||||
return
|
|
||||||
returncode, events, stderr = self.run_python("test_sqlite3")
|
returncode, events, stderr = self.run_python("test_sqlite3")
|
||||||
if returncode:
|
if returncode:
|
||||||
self.fail(stderr)
|
self.fail(stderr)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue