Skip to content

Migrate test_extensions to pytest - #1440

Merged
PGijsbers merged 4 commits into
openml:mainfrom
anirudhsengar:develop
Oct 20, 2026
Merged

PGijsbers merged 4 commits into
openml:mainfrom
anirudhsengar:develop

Conversation

@anirudhsengar

Copy link
Copy Markdown
Contributor

Metadata

  • Reference Issue: Part of Migrate all unittests to pytest #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 TestInit with 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_extensions fixture calls the existing _unregister() helper before and after each test, ensuring the global extension registry is not polluted across tests.
  • Assertions continue to use assert and pytest.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.

Copilot AI balanced review requested due to automatic review settings October 20, 2026 08:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

Copilot AI balanced review requested due to automatic review settings October 20, 2026 08:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

Copilot AI balanced review requested due to automatic review settings October 20, 2026 08:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.84%. Comparing base (13dc887) to head (1ccc149).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1440   +/-   ##
=======================================
  Coverage   53.84%   53.84%           
=======================================
  Files          63       63           
  Lines        5230     5230           
=======================================
  Hits         2816     2816           
  Misses       2414     2414           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@PGijsbers

Copy link
Copy Markdown
Collaborator

Thanks for the contribution!

@PGijsbers
PGijsbers merged commit b9967b8 into openml:main Oct 20, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants