Address flakiness of `test_curl_xy`
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 150
- Fork
- 23
- Merge medio
- 1g 11h
- PR unite (30g)
- 2
Descrizione
test_curl_xy from the test_Maths module is proving itself to be a flaky test, particularly when run within the CI jobs rather than locally (at least as far as I have observed locally, where it always passes):
FAIL: test_curl_xy (test_Maths.MathTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/tmp/test_cf-python/cf/test/test_Maths.py", line 146, in test_curl_xy
self.assertTrue((c.data == c0.data).all())
AssertionError: False is not true
We should adapt it so that the outcome is reliably deterministic. It is probably a simple-enough case of testing floating point equality to a tolerance rather than strict equality as present.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con test/test_Maths.py, in particolare con test_curl_xy intorno all’assertion che fallisce alla riga 146. Esegui il test nell’ambiente simile alla CI e confronta i dati in virgola mobile utilizzati da c.data e c0.data. Il lavoro è completato quando il test utilizza una tolleranza appropriata alla variazione in virgola mobile osservata e passa in modo affidabile.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- testing
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100