Skip to content

Commit

Permalink
Move test fixtures + fix imports
Browse files Browse the repository at this point in the history
Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
  • Loading branch information
merelcht committed Aug 27, 2024
1 parent 13e1467 commit cc62594
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
34 changes: 34 additions & 0 deletions kedro-datasets/kedro_datasets_experimental/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""
This file contains the fixtures that are reusable by any tests within
this directory. You don't need to import the fixtures as pytest will
discover them automatically. More info here:
https://docs.pytest.org/en/latest/fixture.html
"""

from kedro.io.core import generate_timestamp
from pytest import fixture


@fixture(params=[None])
def load_version(request):
return request.param


@fixture(params=[None])
def save_version(request):
return request.param or generate_timestamp()


@fixture(params=[None])
def load_args(request):
return request.param


@fixture(params=[None])
def save_args(request):
return request.param


@fixture(params=[None])
def fs_args(request):
return request.param
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
from pathlib import Path, PurePosixPath

import pytest
from custom_datasets import ProphetModelDataset
from fsspec.implementations.http import HTTPFileSystem
from fsspec.implementations.local import LocalFileSystem
from gcsfs import GCSFileSystem
from kedro.io.core import PROTOCOL_DELIMITER, DatasetError, Version
from prophet import Prophet
from s3fs.core import S3FileSystem

from kedro_datasets_experimental.prophet import ProphetModelDataset


@pytest.fixture
def filepath_json(tmp_path):
Expand Down
1 change: 0 additions & 1 deletion kedro-datasets/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ test = [
"plotly>=4.8.0, <6.0",
"polars[xlsx2csv, deltalake]~=0.18.0",
"pre-commit>=2.9.2",
"prophet>=1.1.5",
"pyarrow>=1.0; python_version < '3.11'",
"pyarrow>=7.0; python_version >= '3.11'", # Adding to avoid numpy build errors
"pyodbc~=5.0",
Expand Down

0 comments on commit cc62594

Please sign in to comment.