Increase test coverage for isclose() function with edge cases for special complex numbers
未關閉
還沒有人認領這個 Issue。
tests
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 36k
- PR 合併指標
- PR 指標待擷取
描述
In Lib/test/test_cmath.py, the isclose() function misses certain test cases for special complex numbers with infinity and Nan. As docs tell:
-inf, inf and NaN behave similarly to the IEEE 754 Standard.
That is, NaN is not close to anything, even itself.
inf and -inf are only close to themselves.
This applies for complex numbers as well (inf + infj , -inf - infj and NaN + NaNj behave in the same way).
Linked PRs
- gh-149923
- gh-149948
- gh-150938
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 Lib/test/test_cmath.py 開始,檢查現有的 isclose() 測試,以及文件中說明的 infinity、negative infinity 和 NaN 行為。為所述的特殊複數情況新增覆蓋,然後執行 cmath 測試檔案以確認預期結果。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- testing-qa
- Issue 類型
- 缺陷
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 35/100