Skip to content

Commit d1be6ab

Browse files
committed
Re-enable tests that were disabled because in #1629
1 parent f809fe8 commit d1be6ab

File tree

8 files changed

+0
-220
lines changed

8 files changed

+0
-220
lines changed

tests/test_datasets/test_dataset_functions.py

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -530,10 +530,6 @@ def test_deletion_of_cache_dir_faulty_download(self, patch):
530530
datasets_cache_dir = os.path.join(openml.config.get_cache_directory(), "datasets")
531531
assert len(os.listdir(datasets_cache_dir)) == 0
532532

533-
@pytest.mark.skipif(
534-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
535-
reason="Pending resolution of #1657",
536-
)
537533
@pytest.mark.test_server()
538534
def test_publish_dataset(self):
539535
arff_file_path = self.static_cache_dir / "org" / "openml" / "test" / "datasets" / "2" / "dataset.arff"
@@ -570,10 +566,6 @@ def test__retrieve_class_labels(self):
570566
labels = custom_ds.retrieve_class_labels(target_name=custom_ds.features[31].name)
571567
assert labels == ["COIL", "SHEET"]
572568

573-
@pytest.mark.skipif(
574-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
575-
reason="Pending resolution of #1657",
576-
)
577569
@pytest.mark.test_server()
578570
def test_upload_dataset_with_url(self):
579571
dataset = OpenMLDataset(
@@ -697,10 +689,6 @@ def test_attributes_arff_from_df_unknown_dtype(self):
697689
with pytest.raises(ValueError, match=err_msg):
698690
attributes_arff_from_df(df)
699691

700-
@pytest.mark.skipif(
701-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
702-
reason="Pending resolution of #1657",
703-
)
704692
@pytest.mark.test_server()
705693
def test_create_dataset_numpy(self):
706694
data = np.array([[1, 2, 3], [1.2, 2.5, 3.8], [2, 5, 8], [0, 1, 0]]).T
@@ -735,10 +723,6 @@ def test_create_dataset_numpy(self):
735723
), "Uploaded arff does not match original one"
736724
assert _get_online_dataset_format(dataset.id) == "arff", "Wrong format for dataset"
737725

738-
@pytest.mark.skipif(
739-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
740-
reason="Pending resolution of #1657",
741-
)
742726
@pytest.mark.test_server()
743727
def test_create_dataset_list(self):
744728
data = [
@@ -794,10 +778,6 @@ def test_create_dataset_list(self):
794778
), "Uploaded ARFF does not match original one"
795779
assert _get_online_dataset_format(dataset.id) == "arff", "Wrong format for dataset"
796780

797-
@pytest.mark.skipif(
798-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
799-
reason="Pending resolution of #1657",
800-
)
801781
@pytest.mark.test_server()
802782
def test_create_dataset_sparse(self):
803783
# test the scipy.sparse.coo_matrix
@@ -946,10 +926,6 @@ def test_get_online_dataset_format(self):
946926
dataset_id
947927
), "The format of the ARFF files is different"
948928

949-
@pytest.mark.skipif(
950-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
951-
reason="Pending resolution of #1657",
952-
)
953929
@pytest.mark.test_server()
954930
def test_create_dataset_pandas(self):
955931
data = [
@@ -1175,10 +1151,6 @@ def test_ignore_attributes_dataset(self):
11751151
paper_url=paper_url,
11761152
)
11771153

1178-
@pytest.mark.skipif(
1179-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
1180-
reason="Pending resolution of #1657",
1181-
)
11821154
@pytest.mark.test_server()
11831155
def test_publish_fetch_ignore_attribute(self):
11841156
"""Test to upload and retrieve dataset and check ignore_attributes"""
@@ -1298,10 +1270,6 @@ def test_create_dataset_row_id_attribute_error(self):
12981270
paper_url=paper_url,
12991271
)
13001272

1301-
@pytest.mark.skipif(
1302-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
1303-
reason="Pending resolution of #1657",
1304-
)
13051273
@pytest.mark.test_server()
13061274
def test_create_dataset_row_id_attribute_inference(self):
13071275
# meta-information
@@ -1470,10 +1438,6 @@ def test_data_edit_non_critical_field(self):
14701438
edited_dataset = openml.datasets.get_dataset(did)
14711439
assert edited_dataset.description == desc
14721440

1473-
@pytest.mark.skipif(
1474-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
1475-
reason="Pending resolution of #1657",
1476-
)
14771441
@pytest.mark.test_server()
14781442
def test_data_edit_critical_field(self):
14791443
# Case 2
@@ -1526,10 +1490,6 @@ def test_data_edit_requires_valid_dataset(self):
15261490
description="xor operation dataset",
15271491
)
15281492

1529-
@pytest.mark.skipif(
1530-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
1531-
reason="Pending resolution of #1657",
1532-
)
15331493
@pytest.mark.test_server()
15341494
def test_data_edit_cannot_edit_critical_field_if_dataset_has_task(self):
15351495
# Need to own a dataset to be able to edit meta-data

tests/test_flows/test_flow.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,6 @@ def test_to_xml_from_xml(self):
180180
openml.flows.functions.assert_flows_equal(new_flow, flow)
181181
assert new_flow is not flow
182182

183-
@pytest.mark.skipif(
184-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
185-
reason="Pending resolution of #1657",
186-
)
187183
@pytest.mark.sklearn()
188184
@pytest.mark.test_server()
189185
def test_publish_flow(self):
@@ -226,10 +222,6 @@ def test_publish_existing_flow(self, flow_exists_mock):
226222
f"collected from {__file__.split('/')[-1]}: {flow.flow_id}",
227223
)
228224

229-
@pytest.mark.skipif(
230-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
231-
reason="Pending resolution of #1657",
232-
)
233225
@pytest.mark.sklearn()
234226
@pytest.mark.test_server()
235227
def test_publish_flow_with_similar_components(self):
@@ -281,10 +273,6 @@ def test_publish_flow_with_similar_components(self):
281273
TestBase._mark_entity_for_removal("flow", flow3.flow_id, flow3.name)
282274
TestBase.logger.info(f"collected from {__file__.split('/')[-1]}: {flow3.flow_id}")
283275

284-
@pytest.mark.skipif(
285-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
286-
reason="Pending resolution of #1657",
287-
)
288276
@pytest.mark.sklearn()
289277
@pytest.mark.test_server()
290278
def test_semi_legal_flow(self):
@@ -395,10 +383,6 @@ def get_sentinel():
395383
flow_id = openml.flows.flow_exists(name, version)
396384
assert not flow_id
397385

398-
@pytest.mark.skipif(
399-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
400-
reason="Pending resolution of #1657",
401-
)
402386
@pytest.mark.sklearn()
403387
@pytest.mark.test_server()
404388
def test_existing_flow_exists(self):
@@ -440,10 +424,6 @@ def test_existing_flow_exists(self):
440424
)
441425
assert downloaded_flow_id == flow.flow_id
442426

443-
@pytest.mark.skipif(
444-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
445-
reason="Pending resolution of #1657",
446-
)
447427
@pytest.mark.sklearn()
448428
@pytest.mark.test_server()
449429
def test_sklearn_to_upload_to_flow(self):

tests/test_flows/test_flow_functions.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,6 @@ def test_get_flow1(self):
310310
flow = openml.flows.get_flow(1)
311311
assert flow.external_version is None
312312

313-
@pytest.mark.skipif(
314-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
315-
reason="Pending resolution of #1657",
316-
)
317313
@pytest.mark.sklearn()
318314
@pytest.mark.test_server()
319315
def test_get_flow_reinstantiate_model(self):
@@ -397,10 +393,6 @@ def test_get_flow_reinstantiate_flow_not_strict_pre_023(self):
397393
assert flow.flow_id is None
398394
assert "sklearn==0.19.1" not in flow.dependencies
399395

400-
@pytest.mark.skipif(
401-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
402-
reason="Pending resolution of #1657",
403-
)
404396
@pytest.mark.sklearn()
405397
@pytest.mark.test_server()
406398
def test_get_flow_id(self):

tests/test_openml/test_api_calls.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ def test_too_long_uri(self):
2121
with pytest.raises(openml.exceptions.OpenMLServerError, match="URI too long!"):
2222
openml.datasets.list_datasets(data_id=list(range(10000)))
2323

24-
@pytest.mark.skipif(
25-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
26-
reason="Pending resolution of #1657",
27-
)
2824
@unittest.mock.patch("time.sleep")
2925
@unittest.mock.patch("requests.Session")
3026
@pytest.mark.test_server()

tests/test_runs/test_run.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,6 @@ def _check_array(array, type_):
118118
else:
119119
assert run_prime_trace_content is None
120120

121-
@pytest.mark.skipif(
122-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
123-
reason="Pending resolution of #1657",
124-
)
125121
@pytest.mark.sklearn()
126122
@pytest.mark.test_server()
127123
def test_to_from_filesystem_vanilla(self):
@@ -157,10 +153,6 @@ def test_to_from_filesystem_vanilla(self):
157153
f"collected from {__file__.split('/')[-1]}: {run_prime.run_id}",
158154
)
159155

160-
@pytest.mark.skipif(
161-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
162-
reason="Pending resolution of #1657",
163-
)
164156
@pytest.mark.sklearn()
165157
@pytest.mark.flaky()
166158
@pytest.mark.test_server()
@@ -197,10 +189,6 @@ def test_to_from_filesystem_search(self):
197189
f"collected from {__file__.split('/')[-1]}: {run_prime.run_id}",
198190
)
199191

200-
@pytest.mark.skipif(
201-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
202-
reason="Pending resolution of #1657",
203-
)
204192
@pytest.mark.sklearn()
205193
@pytest.mark.test_server()
206194
def test_to_from_filesystem_no_model(self):
@@ -307,10 +295,6 @@ def assert_run_prediction_data(task, run, model):
307295
assert_method(y_pred, saved_y_pred)
308296
assert_method(y_test, saved_y_test)
309297

310-
@pytest.mark.skipif(
311-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
312-
reason="Pending resolution of #1657",
313-
)
314298
@pytest.mark.sklearn()
315299
@pytest.mark.test_server()
316300
def test_publish_with_local_loaded_flow(self):
@@ -355,10 +339,6 @@ def test_publish_with_local_loaded_flow(self):
355339
assert openml.flows.flow_exists(flow.name, flow.external_version)
356340
openml.runs.get_run(loaded_run.run_id)
357341

358-
@pytest.mark.skipif(
359-
os.getenv("OPENML_USE_LOCAL_SERVICES") == "true",
360-
reason="Pending resolution of #1657",
361-
)
362342
@pytest.mark.sklearn()
363343
@pytest.mark.test_server()
364344
@pytest.mark.skip(reason="https://github.com/openml/openml-python/issues/1586")

0 commit comments

Comments
 (0)