Skip to content

Commit b33a895

Browse files
committed
Update improper paths in tests
1 parent 4719013 commit b33a895

2 files changed

Lines changed: 20 additions & 12 deletions

File tree

tests/test_datasets/test_dataset.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,13 @@ def test__read_features(mocker, workdir, static_cache_dir):
424424
"org",
425425
"openml",
426426
"test",
427-
"datasets",
427+
"api",
428+
"v1",
429+
"xml",
430+
"data",
431+
"features",
428432
"2",
429-
"features.xml",
433+
"body.xml",
430434
),
431435
)
432436
assert isinstance(features, dict)
@@ -457,9 +461,13 @@ def test__read_qualities(static_cache_dir, workdir, mocker):
457461
"org",
458462
"openml",
459463
"test",
460-
"datasets",
464+
"api",
465+
"v1",
466+
"xml",
467+
"data",
468+
"qualities",
461469
"2",
462-
"qualities.xml",
470+
"body.xml",
463471
),
464472
)
465473
assert isinstance(qualities, dict)

tests/test_datasets/test_dataset_functions.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ def test_deletion_of_cache_dir(self):
501501

502502
@pytest.mark.test_server()
503503
def test_publish_dataset(self):
504-
arff_file_path = self.static_cache_dir / "org" / "openml" / "test" / "datasets" / "2" / "dataset.arff"
504+
arff_file_path = self.static_cache_dir / "org" / "openml" / "test" / "data" / "download" / "1666876" / "phpFsFYVN" / "body.arff"
505505
dataset = OpenMLDataset(
506506
"anneal",
507507
"test",
@@ -1366,8 +1366,8 @@ def test_get_dataset_cache_format_feather(self):
13661366
# Check if dataset is written to cache directory using feather
13671367
cache_dir = openml.config.get_cache_directory()
13681368
cache_dir_for_id = os.path.join(cache_dir, "datasets", "128")
1369-
feather_file = os.path.join(cache_dir,"downloads","data","v1","download","128","iris.arff", "dataset.feather")
1370-
pickle_file = os.path.join(cache_dir,"downloads","data","v1","download","128","iris.arff", "dataset.feather.attributes.pkl.py3")
1369+
feather_file = os.path.join(cache_dir,"data","v1","download","128","iris.arff", "body.feather")
1370+
pickle_file = os.path.join(cache_dir,"data","v1","download","128","iris.arff", "body.feather.attributes.pkl.py3")
13711371
data = pd.read_feather(feather_file)
13721372
assert os.path.isfile(feather_file), "Feather file is missing"
13731373
assert os.path.isfile(pickle_file), "Attributes pickle file is missing"
@@ -1859,17 +1859,17 @@ def _dataset_description_is_downloaded(did: int):
18591859

18601860

18611861
def _dataset_qualities_is_downloaded(did: int):
1862-
cache_directory = Path(openml.config.get_cache_directory()) / "downloads/data/qualities"
1863-
return (cache_directory / str(did) / "qualities.xml").exists()
1862+
cache_directory = Path(openml.config.get_cache_directory()) / "api/v1/xml/data/qualities/"
1863+
return (cache_directory / str(did) / "body.xml").exists()
18641864

18651865

18661866
def _dataset_features_is_downloaded(did: int):
1867-
cache_directory = Path(openml.config.get_cache_directory()) / "downloads/data/features"
1868-
return (cache_directory / str(did) / "features.xml").exists()
1867+
cache_directory = Path(openml.config.get_cache_directory()) / "api/v1/xml/data/features/"
1868+
return (cache_directory / str(did) / "body.xml").exists()
18691869

18701870

18711871
def _dataset_data_file_is_downloaded(did: int):
1872-
cache_directory = Path(openml.config.get_cache_directory()) / "minio/minio/datasets/0000/0001"
1872+
cache_directory = Path(openml.config.get_cache_directory()) / "minio/datasets/0000/0001"
18731873
if not cache_directory.exists():
18741874
return False
18751875
return any(f.suffix in (".pq", ".arff") for f in cache_directory.iterdir())

0 commit comments

Comments
 (0)