Add More Test Cases for Edge Cases in Number Operations
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 18.3k
- Fork
- 3k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của trekhleb/learn-python
-
Typo in Variable Name: "weapon.strip()" Should Be "fruit.strip()" in List Comprehensions Example Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
trekhleb/learn-python#105 · 1 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
trekhleb/learn-python#104 · 1 bình luận ·
-
Learning Python Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
trekhleb/learn-python#108 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
trekhleb/learn-python#107 · 1 bình luận ·
-
Hack Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 1/100
trekhleb/learn-python#102 · 1 bình luận ·
Tất cả issue của trekhleb/learn-python
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
xinnan-tech/xiaozhi-fde-talk#263 ·
-
rules
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
huggingface/Repo2RLEnv#163 · 1 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
huggingface/sentence-transformers#4074 ·
-
comp/dashboard invalid P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
NousResearch/hermes-agent#121143 ·