From c11e9dbca26f60de100f51da2d4ed591e70341b4 Mon Sep 17 00:00:00 2001 From: Marcin Rudolf Date: Fri, 29 Sep 2023 00:01:36 +0200 Subject: [PATCH] skips mssql tests if odbc driver not installed --- tests/load/mssql/test_mssql_table_builder.py | 2 ++ tests/load/pipeline/test_athena.py | 1 + tests/load/redshift/test_redshift_table_builder.py | 1 - 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/load/mssql/test_mssql_table_builder.py b/tests/load/mssql/test_mssql_table_builder.py index a858ce57fd..4f5a6637d6 100644 --- a/tests/load/mssql/test_mssql_table_builder.py +++ b/tests/load/mssql/test_mssql_table_builder.py @@ -5,6 +5,8 @@ from dlt.common.utils import uniq_id from dlt.common.schema import Schema +pytest.importorskip("dlt.destinations.mssql.mssql", reason="MSSQL ODBC driver not installed") + from dlt.destinations.mssql.mssql import MsSqlClient from dlt.destinations.mssql.configuration import MsSqlClientConfiguration, MsSqlCredentials diff --git a/tests/load/pipeline/test_athena.py b/tests/load/pipeline/test_athena.py index 6aa4a3c7b0..dd5baae73b 100644 --- a/tests/load/pipeline/test_athena.py +++ b/tests/load/pipeline/test_athena.py @@ -11,6 +11,7 @@ from tests.load.pipeline.utils import destinations_configs, DestinationTestConfiguration + @pytest.mark.parametrize("destination_config", destinations_configs(default_sql_configs=True, subset=["athena"]), ids=lambda x: x.name) def test_athena_destinations(destination_config: DestinationTestConfiguration) -> None: diff --git a/tests/load/redshift/test_redshift_table_builder.py b/tests/load/redshift/test_redshift_table_builder.py index e6b9fc5a2c..8c61ccc1f2 100644 --- a/tests/load/redshift/test_redshift_table_builder.py +++ b/tests/load/redshift/test_redshift_table_builder.py @@ -6,7 +6,6 @@ from dlt.common.schema import Schema from dlt.common.configuration import resolve_configuration -from dlt.destinations.exceptions import DestinationSchemaWillNotUpdate from dlt.destinations.redshift.redshift import RedshiftClient from dlt.destinations.redshift.configuration import RedshiftClientConfiguration, RedshiftCredentials