openml-python
openml-python copied to clipboard
[MNT] Replace live server calls with mocks in test_setup_functions.py
Metadata
- Reference Issue: Fixes #1649 (
test_setup_functions.py) - New Tests Added: No
- Documentation Updated: No
- Change Log Entry: "Replace live server calls with mocks in
test_setup_functions.py"
Removes @pytest.mark.test_server() from three tests in TestSetupFunctions since they rely on mocking and do not require a live server.
test_list_setups_empty: Mocks HTTP 412 (error 674) and verifies empty dict handling.test_setuplist_offset: Mocks paginated responses (offset/0- 1–10,offset/10- 11–20) and preserves non-overlap assertion.test_get_cached_setup: Uses existing static cache; no server dependency.
The four tests marked with both @pytest.mark.sklearn() and @pytest.mark.test_server() are unchanged.
Test Run
tests/test_setups/test_setup_functions.py::TestSetupFunctions::test_get_cached_setup PASSED tests/test_setups/test_setup_functions.py::TestSetupFunctions::test_get_uncached_setup PASSED tests/test_setups/test_setup_functions.py::TestSetupFunctions::test_list_setups_empty PASSED tests/test_setups/test_setup_functions.py::TestSetupFunctions::test_setuplist_offset PASSED
4 passed in 0.09s