Skip to content

Commit 8d03243

Browse files
committed
Clarify intention of strings through variable names
1 parent 34f2595 commit 8d03243

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

tests/test_openml/test_api_calls.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,19 @@ def fget_object(self, object_name: str, file_path: str, *args, **kwargs) -> None
5555

5656
@mock.patch.object(minio, "Minio")
5757
def test_download_all_files_observes_cache(mock_minio, tmp_path: Path) -> None:
58+
some_prefix, some_filename = "some/prefix", "dataset.arff"
59+
some_object_path = f"{some_prefix}/{some_filename}"
60+
some_url = f"https://not.real.com/bucket/{some_object_path}"
5861
mock_minio.return_value = FakeMinio(
5962
objects=[
60-
FakeObject("with/something/dataset.arff"),
63+
FakeObject(some_object_path),
6164
],
6265
)
6366

64-
_download_minio_bucket(
65-
source="https://not.real.com/bucket/with/something/file.ext",
66-
destination=tmp_path,
67-
)
67+
_download_minio_bucket(source=some_url, destination=tmp_path)
6868
time_created = (tmp_path / "dataset.arff").stat().st_ctime
69-
_download_minio_bucket(
70-
source="https://not.real.com/bucket/with/something/file.ext",
71-
destination=tmp_path,
72-
)
73-
time_modified = (tmp_path / "dataset.arff").stat().st_mtime
69+
70+
_download_minio_bucket(source=some_url, destination=tmp_path)
71+
time_modified = (tmp_path / some_filename).stat().st_mtime
7472

7573
assert time_created == time_modified

0 commit comments

Comments
 (0)