Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[MNT] Replace Live Server Calls with Mocks in Unit Tests

Aperta
#1,649 25 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
testing-qa

Direzione di ricerca

Start by inspecting the listed test files for the production_server and test_server markers, then read openml._api_calls._send_request and its requests.Session usage. Replace the remote calls with mocks or patches in a focused test-file subtask, and run the affected pytest tests to confirm they pass without contacting the live server.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Good First Issue maintenance & CI testing

Several tests currently rely on direct connections to the live server (production/test), which can cause race conditions, server overload, and sporadic failures (see https://github.com/openml/openml-python/issues/1586). To ensure these remain true unit tests, they should use mocks/patches instead of the remote server.

Steps:

  1. Identify tests using the remote server, e.g., marked with "production_server" or "test_server".
  2. Mock or patch requests.Session in tests relying on openml._api_calls._send_request. Alternatively, higher-level mocking can be used to simplify implementation.

Affected test files (can be separate sub-tasks/PRs):

Lingua principale
Python
Stelle
361
Fork
296
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di openml/openml-python

Tutte le issue di openml/openml-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.