realpython / realpython/python-guide
Request: Add notes about where to put unit tests
まだ誰も着手していません。
- 主要言語
- Batchfile
- スター
- 29.8k
- フォーク
- 5.9k
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I did some Googling. None of the pages have very good explanations of where to put your unit test files.
Also, AFAIK (I am a Python newbiew) there are some drawbacks to <project_root>/test/ about importing. Might need to modify PYTHONPATH during unit test runs.
Also, please talk about why init.py is important for unit tests. A few places recommend it... but I thought it was dead in Python3.
Ref: http://pytest.org/latest/goodpractises.html
Ref: http://stackoverflow.com/questions/5341006/where-should-i-put-tests-when-packaging-python-modules
Ref: http://stackoverflow.com/questions/61151/where-do-the-python-unit-tests-go
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
対象ファイルもテストも指定されていません。まず、リンクされている pytest のベストプラクティスとパッケージングに関する議論を確認し、その後、関連するテストドキュメントを見つけてください。テストファイルの配置、import/PYTHONPATH に関する考慮事項、および Python 3 における init.py の役割を説明できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- documentation, testing-qa
- issue の種類
- ドキュメント
- 難易度
- 2/5
- 見積もり時間
- 半日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100