python / python/mypy

Stderr in regular tests should probably go to out as well

Offen
#19,554 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug topic-developer topic-tests
Vorherrschende Sprache
Python
Sterne
20.6k
Forks
3.3k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

[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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit nachzuverfolgen, wie reguläre Tests build.build aufrufen und wie [out] derzeit die Ausgabe erfasst, und vergleiche diesen Ablauf anschließend mit den referenzierten langsamen Befehlszeilentests. Als abgeschlossen gilt die Arbeit, wenn stderr bei regulären Tests ohne Leistungseinbußen in [out] enthalten ist, sodass geeignete Tests in den schnelleren Pfad verschoben werden können.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
testing
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.