mirror of
https://github.com/python/cpython.git
synced 2025-12-05 00:52:25 +00:00
gh-100414: Skip test_dbm_sqlite3 if sqlite3 is unavailable (#115449)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
parent
dd5e4d9078
commit
029ec91d43
1 changed files with 5 additions and 2 deletions
|
|
@ -1,4 +1,3 @@
|
||||||
import sqlite3
|
|
||||||
import sys
|
import sys
|
||||||
import test.support
|
import test.support
|
||||||
import unittest
|
import unittest
|
||||||
|
|
@ -7,8 +6,12 @@ from functools import partial
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from test.support import cpython_only, import_helper, os_helper
|
from test.support import cpython_only, import_helper, os_helper
|
||||||
|
|
||||||
|
|
||||||
dbm_sqlite3 = import_helper.import_module("dbm.sqlite3")
|
dbm_sqlite3 = import_helper.import_module("dbm.sqlite3")
|
||||||
|
# N.B. The test will fail on some platforms without sqlite3
|
||||||
|
# if the sqlite3 import is above the import of dbm.sqlite3.
|
||||||
|
# This is deliberate: if the import helper managed to import dbm.sqlite3,
|
||||||
|
# we must inevitably be able to import sqlite3. Else, we have a problem.
|
||||||
|
import sqlite3
|
||||||
from dbm.sqlite3 import _normalize_uri
|
from dbm.sqlite3 import _normalize_uri
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue