capsys input disable #13746
Unanswered
georgeharker
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a baseline image diff test, for which I define an interactive mode, allowing diffs to be accepted or declined one by one. This works with X11 for the diff frontend and I block on the validation assert until input accepts or not (when in interactive mode).
I want to do a terminal version of this, but
capsys.disable()
doesn't pass through thein
flag tosuspend_capture
herepytest/src/_pytest/capture.py
Line 668 in 958981c
The intervening call to
suspend_global_capture
on multicapture herepytest/src/_pytest/capture.py
Line 788 in 958981c
does deal with input.
I think it would be as easy as modifying
CaptureFixture
to pass the boolean for input herepytest/src/_pytest/capture.py
Line 987 in 958981c
and wire it through here
pytest/src/_pytest/capture.py
Line 841 in 958981c
with sensible current-behavior defaults.
I appreciate reading from
stdin
isn't a great idea for automated tests - this is intended for interactive maintenance of baseline image diffs only.Meanwhile I can do the utterly horrible
Any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions