Skip to content

Commit

Permalink
exclude lines from coverage
Browse files Browse the repository at this point in the history
Signed-off-by: tdhooghe <[email protected]>
  • Loading branch information
tdhooghe committed Oct 23, 2024
1 parent 435159b commit ba6975c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions kedro-datasets/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ show_missing = true
# temporarily ignore kedro_datasets/__init__.py in coverage report
omit = ["tests/*", "kedro_datasets/holoviews/*", "kedro_datasets/tensorflow/*", "kedro_datasets/__init__.py", "kedro_datasets/conftest.py"]
exclude_also = ["raise NotImplementedError", "if TYPE_CHECKING:"]
exclude_lines = [
"pragma: no cover - snowpark python 3.12"
]

[tool.pytest.ini_options]
addopts = """
Expand Down
4 changes: 2 additions & 2 deletions kedro-datasets/tests/snowflake/test_snowpark_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest

if sys.version_info >= (3, 12):
pytest.skip(
pytest.skip( # pragma: no cover - snowpark python 3.12
"Snowpark is not supported in Python versions higher than 3.11",
allow_module_level=True,
)
Expand Down Expand Up @@ -346,7 +346,7 @@ def test_get_session_existing_session(self, mocker, snowflake_dataset):
assert session == mock_active_session
mock_get_active_session.assert_called_once()

@patch("snowflake.snowpark.Session.builder", new_callable=MagicMock)
@patch("snowflake.snowpark.Session.builder")
def test_get_session_no_existing_session(self, mock_builder, snowflake_dataset):
"""
Test the `_get_session` method of `SnowparkTableDataset` when there is no existing session.
Expand Down

0 comments on commit ba6975c

Please sign in to comment.