From 4b995e08031bc15e9b1d346d9ce9c5bc169b9f83 Mon Sep 17 00:00:00 2001 From: Ben Cassell Date: Tue, 13 Feb 2024 13:01:05 -0800 Subject: [PATCH] lint + install missing sqlalchemy library --- .github/workflows/integration.yml | 2 +- src/databricks/sqlalchemy/test_local/test_parsing.py | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 9b31aef8..3cb3e631 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -50,7 +50,7 @@ jobs: #---------------------------------------------- - name: Install dependencies if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - run: poetry install --no-interaction --no-root + run: poetry install --no-interaction --no-root --all-extras #---------------------------------------------- # install your root project, if required #---------------------------------------------- diff --git a/src/databricks/sqlalchemy/test_local/test_parsing.py b/src/databricks/sqlalchemy/test_local/test_parsing.py index 9772b382..c8ab443d 100644 --- a/src/databricks/sqlalchemy/test_local/test_parsing.py +++ b/src/databricks/sqlalchemy/test_local/test_parsing.py @@ -58,9 +58,7 @@ def test_extract_3l_namespace_from_constraint_string(): def test_extract_3l_namespace_from_bad_constraint_string(): - input = ( - "FOREIGN KEY (`parent_user_id`) REFERENCES `pysql_dialect_compliance`.`users` (`user_id`)" - ) + input = "FOREIGN KEY (`parent_user_id`) REFERENCES `pysql_dialect_compliance`.`users` (`user_id`)" with pytest.raises(DatabricksSqlAlchemyParseException): extract_three_level_identifier_from_constraint_string(input) @@ -68,9 +66,7 @@ def test_extract_3l_namespace_from_bad_constraint_string(): @pytest.mark.parametrize("tschema", [None, "some_schema"]) def test_build_fk_dict(tschema): - fk_constraint_string = ( - "FOREIGN KEY (`parent_user_id`) REFERENCES `main`.`some_schema`.`users` (`user_id`)" - ) + fk_constraint_string = "FOREIGN KEY (`parent_user_id`) REFERENCES `main`.`some_schema`.`users` (`user_id`)" result = build_fk_dict("some_fk_name", fk_constraint_string, schema_name=tschema) @@ -127,7 +123,9 @@ def test_build_pk_dict(): ], ] -FMT_SAMPLE_DT_OUTPUT = [{"col_name": i[0], "data_type": i[1]} for i in RAW_SAMPLE_DTE_OUTPUT] +FMT_SAMPLE_DT_OUTPUT = [ + {"col_name": i[0], "data_type": i[1]} for i in RAW_SAMPLE_DTE_OUTPUT +] @pytest.mark.parametrize(