Skip to content

Commit bfb2d3e

Browse files
committed
add MinIOClient in TestBase
1 parent adc0e74 commit bfb2d3e

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

openml/testing.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import requests
1717

1818
import openml
19-
from openml._api import HTTPCache, HTTPClient
19+
from openml._api import HTTPCache, HTTPClient, MinIOClient
2020
from openml.enums import RetryPolicy
2121
from openml.exceptions import OpenMLServerException
2222
from openml.tasks import TaskType
@@ -317,6 +317,7 @@ def setUp(self) -> None:
317317
retry_policy=self.retry_policy,
318318
cache=self.cache,
319319
)
320+
self.minio_client = self._get_minio_client(path=Path(self.dir))
320321

321322
if self.cache.path.exists():
322323
shutil.rmtree(self.cache.path)
@@ -355,6 +356,12 @@ def _get_http_client( # noqa: PLR0913
355356
cache=cache,
356357
)
357358

359+
def _get_minio_client(
360+
self,
361+
path: Path | None = None,
362+
) -> MinIOClient:
363+
return MinIOClient(path=path)
364+
358365
def _get_url(
359366
self,
360367
server: str | None = None,

0 commit comments

Comments
 (0)