Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions tests/test_datasets/test_dataset_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,14 +387,6 @@ def test__download_minio_file_works_with_bucket_subdirectory(self):
file_destination
), "_download_minio_file can download from subdirectories"

def test__get_dataset_parquet_not_cached(self):
description = {
"oml:parquet_url": "http://data.openml.org/dataset20/dataset_20.pq",
"oml:id": "20",
}
path = _get_dataset_parquet(description, cache_directory=self.workdir)
assert isinstance(path, Path), "_get_dataset_parquet returns a path"
assert path.is_file(), "_get_dataset_parquet returns path to real file"

@mock.patch("openml._api_calls._download_minio_file")
def test__get_dataset_parquet_is_cached(self, patch):
Expand Down Expand Up @@ -1942,6 +1934,16 @@ def test_get_dataset_with_invalid_id() -> None:
assert e.value.code == 111


def test__get_dataset_parquet_not_cached():
description = {
"oml:parquet_url": "http://data.openml.org/dataset20/dataset_20.pq",
"oml:id": "20",
}
path = _get_dataset_parquet(description, cache_directory=Path(openml.config.get_cache_directory()))
assert isinstance(path, Path), "_get_dataset_parquet returns a path"
assert path.is_file(), "_get_dataset_parquet returns path to real file"


def test_read_features_from_xml_with_whitespace() -> None:
from openml.datasets.dataset import _read_features

Expand Down
Loading