Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ jobs:
fi

if [ "${{ matrix.sklearn-only }}" = "true" ]; then
marks="sklearn and not production"
marks="sklearn and not production and not uses_test_server"
else
marks="not production"
marks="not production and not uses_test_server"
fi

pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
Expand All @@ -113,17 +113,17 @@ jobs:
fi

if [ "${{ matrix.sklearn-only }}" = "true" ]; then
marks="sklearn and production"
marks="sklearn and production and not uses_test_server"
else
marks="production"
marks="production and not uses_test_server"
fi

pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"

- name: Run tests on Windows
if: matrix.os == 'windows-latest'
run: | # we need a separate step because of the bash-specific if-statement in the previous one.
pytest -n 4 --durations=20 --dist load -sv --reruns 5 --reruns-delay 1
pytest -n 4 --durations=20 --dist load -sv --reruns 5 --reruns-delay 1 -m "not uses_test_server"

- name: Check for files left behind by test
if: matrix.os != 'windows-latest' && always()
Expand Down
9 changes: 8 additions & 1 deletion tests/test_datasets/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ def test_equality_comparison(self):
self.assertNotEqual(self.titanic, "Wrong_object")


@pytest.mark.uses_test_server()
def test_tagging():
dataset = openml.datasets.get_dataset(125, download_data=False)

Expand All @@ -294,7 +295,7 @@ def test_tagging():
datasets = openml.datasets.list_datasets(tag=tag)
assert datasets.empty

@pytest.mark.xfail(reason="failures_issue_1544")
@pytest.mark.uses_test_server()
def test_get_feature_with_ontology_data_id_11():
# test on car dataset, which has built-in ontology references
dataset = openml.datasets.get_dataset(11)
Expand All @@ -303,13 +304,15 @@ def test_get_feature_with_ontology_data_id_11():
assert len(dataset.features[2].ontologies) >= 1
assert len(dataset.features[3].ontologies) >= 1

@pytest.mark.uses_test_server()
def test_add_remove_ontology_to_dataset():
did = 1
feature_index = 1
ontology = "https://www.openml.org/unittest/" + str(time())
openml.datasets.functions.data_feature_add_ontology(did, feature_index, ontology)
openml.datasets.functions.data_feature_remove_ontology(did, feature_index, ontology)

@pytest.mark.uses_test_server()
def test_add_same_ontology_multiple_features():
did = 1
ontology = "https://www.openml.org/unittest/" + str(time())
Expand All @@ -318,6 +321,7 @@ def test_add_same_ontology_multiple_features():
openml.datasets.functions.data_feature_add_ontology(did, i, ontology)


@pytest.mark.uses_test_server()
def test_add_illegal_long_ontology():
did = 1
ontology = "http://www.google.com/" + ("a" * 257)
Expand All @@ -329,6 +333,7 @@ def test_add_illegal_long_ontology():



@pytest.mark.uses_test_server()
def test_add_illegal_url_ontology():
did = 1
ontology = "not_a_url" + str(time())
Expand Down Expand Up @@ -400,6 +405,7 @@ def test_get_sparse_categorical_data_id_395(self):
assert len(feature.nominal_values) == 25


@pytest.mark.uses_test_server()
def test__read_features(mocker, workdir, static_cache_dir):
"""Test we read the features from the xml if no cache pickle is available.
This test also does some simple checks to verify that the features are read correctly
Expand Down Expand Up @@ -431,6 +437,7 @@ def test__read_features(mocker, workdir, static_cache_dir):
assert pickle_mock.dump.call_count == 1


@pytest.mark.uses_test_server()
def test__read_qualities(static_cache_dir, workdir, mocker):
"""Test we read the qualities from the xml if no cache pickle is available.
This test also does some minor checks to ensure that the qualities are read correctly.
Expand Down
Loading