Add More Test Cases for Edge Cases in Number Operations
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- testing-qa
Direzione di ricerca
Start by reading and running test_numbers.py, which currently covers standard operations and type checks for integers, booleans, floats, and complex numbers. Add focused tests for the listed division, floating-point, NaN/infinity, complex-number, and mixed-operand cases; done means the new tests pass and document the expected behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The current test_numbers.py file provides comprehensive coverage for standard operations and type checks for integers, booleans, floats, and complex numbers. However, it would be beneficial to add more test cases that cover edge cases and unusual scenarios. For example:
- Division by zero and its handling (e.g., 1 / 0 raises ZeroDivisionError).
- Very large and very small floating-point numbers (e.g., underflow/overflow).
- Operations involving NaN and infinity in floats.
- Complex number operations with zero imaginary or real parts.
- Boolean operations with non-boolean operands.
Adding these tests will help ensure robustness and correctness when handling special cases in numerical computations.
- Lingua principale
- Python
- Stelle
- 18.3k
- Fork
- 3k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
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.
Altre issue di trekhleb/learn-python
-
Typo in Variable Name: "weapon.strip()" Should Be "fruit.strip()" in List Comprehensions Example Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
trekhleb/learn-python#105 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
trekhleb/learn-python#104 · 1 commento ·
-
Learning Python Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
trekhleb/learn-python#108 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 30/100
trekhleb/learn-python#107 · 1 commento ·
-
Hack Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 1/100
trekhleb/learn-python#102 · 1 commento ·
Tutte le issue di trekhleb/learn-python
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
xinnan-tech/xiaozhi-fde-talk#263 ·
-
rules
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
huggingface/Repo2RLEnv#163 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
huggingface/sentence-transformers#4074 ·
-
comp/dashboard invalid P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
NousResearch/hermes-agent#121143 ·