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

Add More Test Cases for Edge Cases in Number Operations

Aperta
#106 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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

  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 trekhleb/learn-python

Tutte le issue di trekhleb/learn-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.