Skip to content

[MNT] Mock live server calls in test_supervised_task.py#1691

Open
Dijo-404 wants to merge 3 commits intoopenml:mainfrom
Dijo-404:fix/test_tasks/test_supervised_task
Open

[MNT] Mock live server calls in test_supervised_task.py#1691
Dijo-404 wants to merge 3 commits intoopenml:mainfrom
Dijo-404:fix/test_tasks/test_supervised_task

Conversation

@Dijo-404
Copy link

Metadata

Details

  • This PR updates the tests in test_tasks/test_supervised_task.py to use mocks/patches instead of making direct connections to the live remote server.

Copilot AI review requested due to automatic review settings March 10, 2026 14:06
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to convert tests/test_tasks/test_supervised_task.py away from live server usage by introducing mocks/patches for task retrieval and get_X_and_y().

Changes:

  • Removed live get_task(...) usage from OpenMLSupervisedTaskTest.test_get_X_and_Y.
  • Added unittest.mock-based mocking (MagicMock, patch) to avoid network calls.
  • Minor cleanup in base-class skip message / imports.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants