diff --git a/kedro-datasets/kedro_datasets/ibis/file_dataset.py b/kedro-datasets/kedro_datasets/ibis/file_dataset.py index 72b53d2b6..a55e92a68 100644 --- a/kedro-datasets/kedro_datasets/ibis/file_dataset.py +++ b/kedro-datasets/kedro_datasets/ibis/file_dataset.py @@ -1,7 +1,6 @@ """Provide file loading and saving functionality for Ibis's backends.""" from __future__ import annotations -import os from copy import deepcopy from pathlib import Path, PurePosixPath from typing import TYPE_CHECKING, Any, ClassVar @@ -119,7 +118,7 @@ def __init__( # noqa: PLR0913 super().__init__( filepath=PurePosixPath(filepath), version=version, - exists_function=os.path.exists, + exists_function=lambda filepath: Path(filepath).exists(), ) # Set load and save arguments, overwriting defaults if provided. diff --git a/kedro-datasets/tests/ibis/test_file_dataset.py b/kedro-datasets/tests/ibis/test_file_dataset.py index 7a41b2576..e598bffff 100644 --- a/kedro-datasets/tests/ibis/test_file_dataset.py +++ b/kedro-datasets/tests/ibis/test_file_dataset.py @@ -1,3 +1,4 @@ +import sys from pathlib import Path from time import sleep @@ -251,6 +252,7 @@ def test_save_version_warning( with pytest.warns(UserWarning, match=pattern): versioned_file_dataset.save(dummy_table) + @pytest.mark.skipif(sys.platform == "win32", reason="different error on windows") def test_versioning_existing_dataset( self, file_dataset, versioned_file_dataset, dummy_table ):