python / python/cpython

Increase test coverage for isclose() function with edge cases for special complex numbers

オープン
#149,924 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

tests
主要言語
Python
スター
77.2k
フォーク
35.9k
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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Lib/test/test_cmath.py から始め、既存の isclose() テストと、infinity、negative infinity、NaN に関する文書化された動作を確認してください。指定された複素数の特殊なケースのカバレッジを追加し、その後 cmath のテストファイルを実行して期待される結果を確認してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
testing-qa
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。