Skip to content

Commit 44c2bd5

Browse files
committed
Dont use start/stop, adjust for new defaults
1 parent 5279ab7 commit 44c2bd5

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
if [ ${{ matrix.code-cov }} ]; then codecov='--cov=openml --long --cov-report=xml'; fi
103103
# Most of the time, running only the scikit-learn tests is sufficient
104104
if [ ${{ matrix.sklearn-only }} = 'true' ]; then marks='sklearn and not production'; else marks='not production'; fi
105-
echo pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true $marks
105+
echo pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
106106
pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
107107
- name: Run tests on Ubuntu Production
108108
if: matrix.os == 'ubuntu-latest'

tests/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,8 @@ def with_server(request):
274274
openml.config.server = "https://www.openml.org/api/v1/xml"
275275
yield
276276
return
277-
openml.config.start_using_configuration_for_example()
277+
openml.config.server = "https://test.openml.org/api/v1/xml"
278+
openml.config.apikey = "c0c42819af31e706efe1f4b88c23c6c1"
278279
yield
279280

280281

tests/test_datasets/test_dataset_functions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1951,7 +1951,8 @@ def test_get_dataset_parquet(requests_mock, test_files_directory):
19511951
content_file = (
19521952
test_files_directory / "mock_responses" / "datasets" / "data_description_61.xml"
19531953
)
1954-
requests_mock.get("https://www.openml.org/api/v1/xml/data/61", text=content_file.read_text())
1954+
# While the mocked example is from production, unit tests by default connect to the test server.
1955+
requests_mock.get("https://test.openml.org/api/v1/xml/data/61", text=content_file.read_text())
19551956
dataset = openml.datasets.get_dataset(61, download_data=True)
19561957
assert dataset._parquet_url is not None
19571958
assert dataset.parquet_file is not None

0 commit comments

Comments
 (0)