openml-python
openml-python copied to clipboard
Migrate test_extensions to pytest
Metadata
- Reference Issue: Part of https://github.com/openml/openml-python/issues/1252
- New Tests Added: Yes (migrate existing tests to pytest style)
- Documentation Updated: No
- Change Log Entry: “Migrate test_extensions/test_functions.py to pytest-style tests”
Details
- This PR migrates test_functions.py from
unittest.TestCase-based tests (openml.testing.TestBase) to pure pytest-style tests. - It replaces the class-based
TestInitwith module-level test functions and introduces a small pytest fixture to manage the registration state of dummy extensions used in the tests. - The new
clean_test_extensionsfixture calls the existing_unregister()helper before and after each test, ensuring the global extension registry is not polluted across tests. - Assertions continue to use
assertandpytest.raises, consistent with the style already used in test_utils.py. - No functional changes to the OpenML extensions API are introduced; only the test implementation is refactored.