python / python/mypy

Stderr in regular tests should probably go to out as well

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

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

bug topic-developer topic-tests
主要言語
Python
スター
20.6k
フォーク
3.3k
PR マージ指標
PR 指標を取得中

説明

[out] in regular tests should probably include stderr as well.

Recently, while making https://github.com/python/mypy/pull/19494, I learned that normal tests do not account for errors that go to stderr instead of stdout. This should be fixed, if possible (without performance penalty, so that normal tests can run a broader swath of tests.

This would allow more tests to be moved from slow cmdline tests to fast normal tests, à la https://github.com/python/mypy/issues/5966

I tried mucking about with the invocation of build.build in what struck me as the obvious ways, but even though I was able to get various ---------------------------- Captured stderr call ----------------------------- messages to pop off, I couldn't get the stderr to actually go into [out], even in a very crude way.

I'm not sure about how all this is plumbed, but it seems to me there's a minimal risk of erroneous stderr output messing up unrelated tests with false positives (or are they false negatives?), if we did have this working.

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

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

はじめの一歩

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

調査の方向性

まず、通常のテストがどのように build.build を呼び出し、[out] が現在どのように出力を取得しているかを追跡し、次にその経路を、参照されている遅いコマンドラインテストの経路と比較します。通常のテストで stderr がパフォーマンスの低下なしに [out] に含まれ、適切なテストをより高速な経路に移行できるようになれば完了です。

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

評価

技術スタック
python
領域
testing
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

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

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