Add More Test Cases for Edge Cases in Number Operations
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- python
- 领域
- testing-qa
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Python
- 星标
- 18.3k
- 派生
- 3k
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
trekhleb/learn-python 的其他 Issue
-
Typo in Variable Name: "weapon.strip()" Should Be "fruit.strip()" in List Comprehensions Example 未关闭
难度 1/5 1 小时以内 新手友好度 82/100
trekhleb/learn-python#105 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 72/100
trekhleb/learn-python#104 · 1 条评论 ·
-
Learning Python 未关闭
难度 5/5 一周以上 新手友好度 10/100
trekhleb/learn-python#108 ·
-
难度 3/5 1-2 天 新手友好度 30/100
trekhleb/learn-python#107 · 1 条评论 ·
-
Hack 未关闭
难度 5/5 一周以上 新手友好度 1/100
trekhleb/learn-python#102 · 1 条评论 ·
查看 trekhleb/learn-python 的全部 Issue
相似的 Issue
-
bug confirmed issue
难度 2/5 1-3 小时 新手友好度 75/100
open-webui/open-webui#30750 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
-
good first issue
难度 1/5 1 小时以内 新手友好度 90/100