Stderr in regular tests should probably go to out as well
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
[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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how regular tests invoke build.build and how [out] currently captures output, then compare that path with the referenced slow command-line tests. Done means stderr is included in [out] for regular tests without a performance penalty, enabling suitable tests to move to the faster path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100