Skip to content

Commit f524d75

Browse files
committed
Update test to use dataset file that is already in cache
Note that the previously strategy didn't work anymore if the server returned a parquet file, which is the case for the new local setup.
1 parent 3b79017 commit f524d75

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

tests/test_datasets/test_dataset_functions.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -532,22 +532,15 @@ def test_deletion_of_cache_dir_faulty_download(self, patch):
532532

533533
@pytest.mark.uses_test_server()
534534
def test_publish_dataset(self):
535-
# lazy loading not possible as we need the arff-file.
536-
openml.datasets.get_dataset(3, download_data=True)
537-
file_path = os.path.join(
538-
openml.config.get_cache_directory(),
539-
"datasets",
540-
"3",
541-
"dataset.arff",
542-
)
535+
arff_file_path = Path(__file__).parent.parent / "files" / "org" / "openml" / "test" / "datasets" / "2" / "dataset.arff"
543536
dataset = OpenMLDataset(
544537
"anneal",
545538
"test",
546539
data_format="arff",
547540
version=1,
548541
licence="public",
549542
default_target_attribute="class",
550-
data_file=file_path,
543+
data_file=arff_file_path,
551544
)
552545
dataset.publish()
553546
TestBase._mark_entity_for_removal("data", dataset.dataset_id)

0 commit comments

Comments
 (0)