mirror of
https://github.com/apache/superset.git
synced 2026-09-11 01:34:35 +00:00
+27





![dependabot[bot]](/assets/img/avatar_default.png)



Evan Rusackas
Superset Dev
Claude Opus 4.8
dependabot[bot]
Milad Rashidikhah
bucketbase26
Joe Li
Viktor Högberg
joey
Cursor
Chandan P
Mafi
Matt Fitzgerald
Enzo Martellucci
Alexandru Soare
Mehmet Salih Yavuz
Sanmitra Nagaraj
Lalith Kothuru
shaurya
Shaurya
Đỗ Trọng Hải
rlei
Ville Brofeldt
Gabriel Torres Ruiz
hainenber
ʈᵃᵢ
Mike Bridge
Elizabeth Thompson
Francesco.Castaldi
FrancescoCastaldi
Abdul Rehman
Sepuri Sai Krishna
Mallikarjuna Reddy Nimmakayala
PRATHAMESH HUKKERI
Prathamesh Hukkeri
github-actions[bot]
SBIN2010
3e13b89427
Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: hainenber <dotronghai96@gmail.com> Signed-off-by: Gabriel Torres Ruiz <gabo2595@gmail.com> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Superset Dev <dev@superset.apache.org> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Milad Rashidikhah <mrashidikhah32@gmail.com> Co-authored-by: bucketbase26 <singhayush062006@gmail.com> Co-authored-by: Joe Li <joe@preset.io> Co-authored-by: Viktor Högberg <119532259+vhogberg@users.noreply.github.com> Co-authored-by: joey <97154801+chkang83@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Chandan P <95340276+NoiceHax@users.noreply.github.com> Co-authored-by: Mafi <matt.fitzgerald@gmail.com> Co-authored-by: Matt Fitzgerald <matt.fitzgerald@preset.io> Co-authored-by: Enzo Martellucci <52219496+EnxDev@users.noreply.github.com> Co-authored-by: Alexandru Soare <37236580+alexandrusoare@users.noreply.github.com> Co-authored-by: Mehmet Salih Yavuz <salih.yavuz@proton.me> Co-authored-by: Sanmitra Nagaraj <48400413+s1ny1998@users.noreply.github.com> Co-authored-by: Lalith Kothuru <lalith.kothuru@gmail.com> Co-authored-by: shaurya <shauryajaiswal.dev@gmail.com> Co-authored-by: Shaurya <19599684+no-hup@users.noreply.github.com> Co-authored-by: Đỗ Trọng Hải <41283691+hainenber@users.noreply.github.com> Co-authored-by: rlei <242280117+rlei-odes@users.noreply.github.com> Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com> Co-authored-by: Gabriel Torres Ruiz <gabo2595@gmail.com> Co-authored-by: hainenber <dotronghai96@gmail.com> Co-authored-by: ʈᵃᵢ <tai@apache.org> Co-authored-by: Mike Bridge <michael.bridge@preset.io> Co-authored-by: Elizabeth Thompson <eschutho@gmail.com> Co-authored-by: Francesco.Castaldi <info@francescocastaldi.it> Co-authored-by: FrancescoCastaldi <francesco.castaldi@mapsgroup.it> Co-authored-by: Abdul Rehman <76230556+Abdulrehman-PIAIC80387@users.noreply.github.com> Co-authored-by: Sepuri Sai Krishna <saik20533@gmail.com> Co-authored-by: Mallikarjuna Reddy Nimmakayala <mallikarjunareddy.nimmakayala@gmail.com> Co-authored-by: PRATHAMESH HUKKERI <prathamhukkeri04@gmail.com> Co-authored-by: Prathamesh Hukkeri <prathamesh04@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: SBIN2010 <Sbin2010@mail.ru>
48 lines
1.9 KiB
Python
48 lines
1.9 KiB
Python
# Licensed to the Apache Software Foundation (ASF) under one
|
|
# or more contributor license agreements. See the NOTICE file
|
|
# distributed with this work for additional information
|
|
# regarding copyright ownership. The ASF licenses this file
|
|
# to you under the Apache License, Version 2.0 (the
|
|
# "License"); you may not use this file except in compliance
|
|
# with the License. You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing,
|
|
# software distributed under the License is distributed on an
|
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
# KIND, either express or implied. See the License for the
|
|
# specific language governing permissions and limitations
|
|
# under the License.
|
|
"""
|
|
Shared import guard for the per-dialect testcontainers modules
|
|
(tests/testcontainers/db_engine_specs/test_*.py), each of which needs its
|
|
own optional `testcontainers[...]` driver submodule to even import.
|
|
"""
|
|
|
|
import importlib
|
|
import os
|
|
|
|
|
|
def require_driver(module_name: str) -> None:
|
|
"""
|
|
Import `module_name`, a dialect's `testcontainers` driver submodule.
|
|
|
|
Most environments treat that driver as optional: a bare local `pytest`
|
|
run, or another CI job that never installed the `testcontainers` extras,
|
|
should skip the module rather than fail collection outright.
|
|
|
|
The dedicated per-dialect CI job (.github/workflows/testcontainers.yml)
|
|
sets SUPERSET_TESTCONTAINERS_STRICT, because there the driver is not
|
|
optional -- that job's matrix installs exactly this one driver for
|
|
exactly this one module. A broken or missing import there means the job
|
|
is misconfigured, and should fail loudly instead of silently reporting
|
|
a misleadingly green, zero-tests-run result.
|
|
"""
|
|
if os.environ.get("SUPERSET_TESTCONTAINERS_STRICT"):
|
|
importlib.import_module(module_name)
|
|
else:
|
|
import pytest
|
|
|
|
pytest.importorskip(module_name)
|