You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 the in flag to suspend_capture here
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
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