Increase test coverage for isclose() function with edge cases for special complex numbers
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 35.9k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
In Lib/test/test_cmath.py, the isclose() function misses certain test cases for special complex numbers with infinity and Nan. As docs tell:
-inf, inf and NaN behave similarly to the IEEE 754 Standard.
That is, NaN is not close to anything, even itself.
inf and -inf are only close to themselves.
This applies for complex numbers as well (inf + infj , -inf - infj and NaN + NaNj behave in the same way).
Linked PRs
- gh-149923
- gh-149948
- gh-150938
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 in Lib/test/test_cmath.py e ispeziona i test esistenti di isclose() e il comportamento documentato per infinity, negative infinity e NaN. Aggiungi la copertura per i casi speciali di numeri complessi indicati, quindi esegui il file di test cmath per confermare i risultati attesi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- testing-qa
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 35/100