Skip to content

Commit 7fb265d

Browse files
convert test to pytest (#1405)
Co-authored-by: LennartPurucker <contact@lennart-purucker.com>
1 parent 6278813 commit 7fb265d

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

tests/test_datasets/test_dataset_functions.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -387,14 +387,6 @@ def test__download_minio_file_works_with_bucket_subdirectory(self):
387387
file_destination
388388
), "_download_minio_file can download from subdirectories"
389389

390-
def test__get_dataset_parquet_not_cached(self):
391-
description = {
392-
"oml:parquet_url": "http://data.openml.org/dataset20/dataset_20.pq",
393-
"oml:id": "20",
394-
}
395-
path = _get_dataset_parquet(description, cache_directory=self.workdir)
396-
assert isinstance(path, Path), "_get_dataset_parquet returns a path"
397-
assert path.is_file(), "_get_dataset_parquet returns path to real file"
398390

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

19441936

1937+
def test__get_dataset_parquet_not_cached():
1938+
description = {
1939+
"oml:parquet_url": "http://data.openml.org/dataset20/dataset_20.pq",
1940+
"oml:id": "20",
1941+
}
1942+
path = _get_dataset_parquet(description, cache_directory=Path(openml.config.get_cache_directory()))
1943+
assert isinstance(path, Path), "_get_dataset_parquet returns a path"
1944+
assert path.is_file(), "_get_dataset_parquet returns path to real file"
1945+
1946+
19451947
def test_read_features_from_xml_with_whitespace() -> None:
19461948
from openml.datasets.dataset import _read_features
19471949

0 commit comments

Comments
 (0)