@@ -81,7 +81,7 @@ def test_get_config_as_dict(self):
8181 _config = {}
8282 _config ["api_version" ] = APIVersion .V1
8383 _config ["fallback_api_version" ] = None
84- _config ["servers" ] = openml ._config . SERVERS_REGISTRY [ ' production' ]
84+ _config ["servers" ] = openml .config . get_servers ( " production" )
8585 _config ["cachedir" ] = self .workdir
8686 _config ["avoid_duplicate_runs" ] = False
8787 _config ["connection_n_retries" ] = 20
@@ -96,7 +96,7 @@ def test_setup_with_config(self):
9696 _config = {}
9797 _config ["api_version" ] = APIVersion .V1
9898 _config ["fallback_api_version" ] = None
99- _config ["servers" ] = openml ._config . SERVERS_REGISTRY [ ' production' ]
99+ _config ["servers" ] = openml .config . get_servers ( " production" )
100100 _config ["cachedir" ] = self .workdir
101101 _config ["avoid_duplicate_runs" ] = True
102102 _config ["retry_policy" ] = "human"
@@ -193,10 +193,11 @@ def test_openml_cache_dir_env_var(tmp_path: Path) -> None:
193193 expected_path = tmp_path / "test-cache"
194194
195195 with safe_environ_patcher ("OPENML_CACHE_DIR" , str (expected_path )):
196+ openml .config ._setup ()
197+
196198 server_parts = urlparse (openml .config .server ).netloc
197199 server_parts = server_parts .split ("." )[::- 1 ]
198200 server_parts = "/" .join (server_parts )
199201
200- openml .config ._setup ()
201202 assert openml .config ._root_cache_directory == expected_path
202203 assert openml .config .get_cache_directory () == str (expected_path / server_parts )
0 commit comments