@@ -48,7 +48,7 @@ def _check_flow(self, flow):
4848
4949 @pytest .mark .production ()
5050 def test_list_flows (self ):
51- openml . config . server = self .production_server
51+ self .use_production_server ()
5252 # We can only perform a smoke test here because we test on dynamic
5353 # data from the internet...
5454 flows = openml .flows .list_flows ()
@@ -59,7 +59,7 @@ def test_list_flows(self):
5959
6060 @pytest .mark .production ()
6161 def test_list_flows_output_format (self ):
62- openml . config . server = self .production_server
62+ self .use_production_server ()
6363 # We can only perform a smoke test here because we test on dynamic
6464 # data from the internet...
6565 flows = openml .flows .list_flows ()
@@ -68,21 +68,22 @@ def test_list_flows_output_format(self):
6868
6969 @pytest .mark .production ()
7070 def test_list_flows_empty (self ):
71+ self .use_production_server ()
7172 openml .config .server = self .production_server
7273 flows = openml .flows .list_flows (tag = "NoOneEverUsesThisTag123" )
7374 assert flows .empty
7475
7576 @pytest .mark .production ()
7677 def test_list_flows_by_tag (self ):
77- openml . config . server = self .production_server
78+ self .use_production_server ()
7879 flows = openml .flows .list_flows (tag = "weka" )
7980 assert len (flows ) >= 5
8081 for flow in flows .to_dict (orient = "index" ).values ():
8182 self ._check_flow (flow )
8283
8384 @pytest .mark .production ()
8485 def test_list_flows_paginate (self ):
85- openml . config . server = self .production_server
86+ self .use_production_server ()
8687 size = 10
8788 maximum = 100
8889 for i in range (0 , maximum , size ):
@@ -302,7 +303,7 @@ def test_sklearn_to_flow_list_of_lists(self):
302303 def test_get_flow1 (self ):
303304 # Regression test for issue #305
304305 # Basically, this checks that a flow without an external version can be loaded
305- openml . config . server = self .production_server
306+ self .use_production_server ()
306307 flow = openml .flows .get_flow (1 )
307308 assert flow .external_version is None
308309
@@ -335,7 +336,7 @@ def test_get_flow_reinstantiate_model_no_extension(self):
335336 )
336337 @pytest .mark .production ()
337338 def test_get_flow_with_reinstantiate_strict_with_wrong_version_raises_exception (self ):
338- openml . config . server = self .production_server
339+ self .use_production_server ()
339340 flow = 8175
340341 expected = "Trying to deserialize a model with dependency sklearn==0.19.1 not satisfied."
341342 self .assertRaisesRegex (
@@ -356,7 +357,7 @@ def test_get_flow_with_reinstantiate_strict_with_wrong_version_raises_exception(
356357 )
357358 @pytest .mark .production ()
358359 def test_get_flow_reinstantiate_flow_not_strict_post_1 (self ):
359- openml . config . server = self .production_server
360+ self .use_production_server ()
360361 flow = openml .flows .get_flow (flow_id = 19190 , reinstantiate = True , strict_version = False )
361362 assert flow .flow_id is None
362363 assert "sklearn==1.0.0" not in flow .dependencies
@@ -370,7 +371,7 @@ def test_get_flow_reinstantiate_flow_not_strict_post_1(self):
370371 )
371372 @pytest .mark .production ()
372373 def test_get_flow_reinstantiate_flow_not_strict_023_and_024 (self ):
373- openml . config . server = self .production_server
374+ self .use_production_server ()
374375 flow = openml .flows .get_flow (flow_id = 18587 , reinstantiate = True , strict_version = False )
375376 assert flow .flow_id is None
376377 assert "sklearn==0.23.1" not in flow .dependencies
@@ -382,7 +383,7 @@ def test_get_flow_reinstantiate_flow_not_strict_023_and_024(self):
382383 )
383384 @pytest .mark .production ()
384385 def test_get_flow_reinstantiate_flow_not_strict_pre_023 (self ):
385- openml . config . server = self .production_server
386+ self .use_production_server ()
386387 flow = openml .flows .get_flow (flow_id = 8175 , reinstantiate = True , strict_version = False )
387388 assert flow .flow_id is None
388389 assert "sklearn==0.19.1" not in flow .dependencies
0 commit comments