Skip to content

Commit b740101

Browse files
committed
More xfail skips
1 parent f5a13bb commit b740101

6 files changed

Lines changed: 14 additions & 3 deletions

File tree

tests/test_datasets/test_dataset.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,13 +302,15 @@ def test_get_feature_with_ontology_data_id_11():
302302
assert len(dataset.features[2].ontologies) >= 1
303303
assert len(dataset.features[3].ontologies) >= 1
304304

305+
@pytest.mark.xfail(reason="failures_issue_1544")
305306
def test_add_remove_ontology_to_dataset():
306307
did = 1
307308
feature_index = 1
308309
ontology = "https://www.openml.org/unittest/" + str(time())
309310
openml.datasets.functions.data_feature_add_ontology(did, feature_index, ontology)
310311
openml.datasets.functions.data_feature_remove_ontology(did, feature_index, ontology)
311312

313+
@pytest.mark.xfail(reason="failures_issue_1544")
312314
def test_add_same_ontology_multiple_features():
313315
did = 1
314316
ontology = "https://www.openml.org/unittest/" + str(time())

tests/test_datasets/test_dataset_functions.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,7 @@ def test_deletion_of_cache_dir_faulty_download(self, patch):
513513
datasets_cache_dir = os.path.join(self.workdir, "org", "openml", "test", "datasets")
514514
assert len(os.listdir(datasets_cache_dir)) == 0
515515

516+
@pytest.mark.xfail(reason="failures_issue_1544")
516517
def test_publish_dataset(self):
517518
# lazy loading not possible as we need the arff-file.
518519
openml.datasets.get_dataset(3, download_data=True)
@@ -1389,6 +1390,7 @@ def test_get_dataset_cache_format_feather(self):
13891390
assert len(categorical) == X.shape[1]
13901391
assert len(attribute_names) == X.shape[1]
13911392

1393+
@pytest.mark.xfail(reason="failures_issue_1544")
13921394
def test_data_edit_non_critical_field(self):
13931395
# Case 1
13941396
# All users can edit non-critical fields of datasets
@@ -1410,6 +1412,7 @@ def test_data_edit_non_critical_field(self):
14101412
edited_dataset = openml.datasets.get_dataset(did)
14111413
assert edited_dataset.description == desc
14121414

1415+
@pytest.mark.xfail(reason="failures_issue_1544")
14131416
def test_data_edit_critical_field(self):
14141417
# Case 2
14151418
# only owners (or admin) can edit all critical fields of datasets
@@ -1458,6 +1461,7 @@ def test_data_edit_requires_valid_dataset(self):
14581461
description="xor operation dataset",
14591462
)
14601463

1464+
@pytest.mark.xfail(reason="failures_issue_1544")
14611465
def test_data_edit_cannot_edit_critical_field_if_dataset_has_task(self):
14621466
# Need to own a dataset to be able to edit meta-data
14631467
# Will be creating a forked version of an existing dataset to allow the unit test user
@@ -1533,7 +1537,7 @@ def test_list_datasets_with_high_size_parameter(self):
15331537
(None, None, ["wrong", "sunny"]),
15341538
],
15351539
)
1536-
@pytest.mark.xfail(reason="failures_issue_1544")
1540+
@pytest.mark.xfail(reason="failures_issue_1544",strict=False)
15371541
def test_invalid_attribute_validations(
15381542
default_target_attribute,
15391543
row_id_attribute,
@@ -1595,7 +1599,7 @@ def test_invalid_attribute_validations(
15951599
(None, None, ["outlook", "windy"]),
15961600
],
15971601
)
1598-
@pytest.mark.xfail(reason="failures_issue_1544")
1602+
@pytest.mark.xfail(reason="failures_issue_1544",strict=False)
15991603
def test_valid_attribute_validations(default_target_attribute, row_id_attribute, ignore_attribute):
16001604
data = [
16011605
["a", "sunny", 85.0, 85.0, "FALSE", "no"],

tests/test_runs/test_run.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class TestRun(TestBase):
2525
# Splitting not helpful, these test's don't rely on the server and take
2626
# less than 1 seconds
2727

28+
@pytest.mark.xfail(reason="failures_issue_1544")
2829
def test_tagging(self):
2930
runs = openml.runs.list_runs(size=1)
3031
assert not runs.empty, "Test server state is incorrect"

tests/test_tasks/test_supervised_task.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import pandas as pd
77

88
from openml.tasks import get_task
9+
import pytest
910

1011
from .test_task import OpenMLTaskTest
1112

@@ -27,6 +28,7 @@ def setUpClass(cls):
2728
def setUp(self, n_levels: int = 1):
2829
super().setUp()
2930

31+
@pytest.mark.xfail(reason="failures_issue_1544")
3032
def test_get_X_and_Y(self) -> tuple[pd.DataFrame, pd.Series]:
3133
task = get_task(self.task_id)
3234
X, Y = task.get_X_and_y()

tests/test_tasks/test_task_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ def test_list_tasks(self):
100100
for task in tasks.to_dict(orient="index").values():
101101
self._check_task(task)
102102

103-
@pytest.mark.xfail(reason="failures_issue_1544")
104103
def test_list_tasks_paginate(self):
105104
size = 10
106105
max = 100
@@ -177,6 +176,7 @@ def test_get_task_lazy(self):
177176
)
178177

179178
@mock.patch("openml.tasks.functions.get_dataset")
179+
@pytest.mark.xfail(reason="failures_issue_1544")
180180
def test_removal_upon_download_failure(self, get_dataset):
181181
class WeirdException(Exception):
182182
pass

tests/test_tasks/test_task_methods.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import openml
77
from openml.testing import TestBase
8+
import pytest
89

910

1011
# Common methods between tasks
@@ -15,6 +16,7 @@ def setUp(self):
1516
def tearDown(self):
1617
super().tearDown()
1718

19+
@pytest.mark.xfail(reason="failures_issue_1544")
1820
def test_tagging(self):
1921
task = openml.tasks.get_task(1) # anneal; crossvalidation
2022
# tags can be at most 64 alphanumeric (+ underscore) chars

0 commit comments

Comments
 (0)