File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434from pathlib import Path
3535import pytest
3636import openml_sklearn
37+ from openml ._api import HTTPClient , MinIOClient
38+ from openml .enums import APIVersion
3739
3840import openml
3941from openml .testing import TestBase
@@ -307,3 +309,28 @@ def workdir(tmp_path):
307309 os .chdir (tmp_path )
308310 yield tmp_path
309311 os .chdir (original_cwd )
312+
313+
314+ @pytest .fixture
315+ def use_api_v1 () -> None :
316+ openml .config .set_api_version (api_version = APIVersion .V1 )
317+
318+
319+ @pytest .fixture
320+ def use_api_v2 () -> None :
321+ openml .config .set_api_version (api_version = APIVersion .V2 )
322+
323+
324+ @pytest .fixture
325+ def http_client_v1 () -> HTTPClient :
326+ return HTTPClient (api_version = APIVersion .V1 )
327+
328+
329+ @pytest .fixture
330+ def http_client_v2 () -> HTTPClient :
331+ return HTTPClient (api_version = APIVersion .V2 )
332+
333+
334+ @pytest .fixture
335+ def minio_client () -> MinIOClient :
336+ return MinIOClient ()
You can’t perform that action at this time.
0 commit comments