learn-python icon indicating copy to clipboard operation
learn-python copied to clipboard

Add More Test Cases for Edge Cases in Number Operations

Open Imran-imtiaz48 opened this issue 6 months ago • 0 comments

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.

Imran-imtiaz48 avatar Jun 26 '25 19:06 Imran-imtiaz48