Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnixConsole: raise EOFError in case input_fd is not a TTY #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

blueyed
Copy link
Collaborator

@blueyed blueyed commented Apr 30, 2019

This is required for when the UnixConsole instance was created with
stdin being a terminal, but then later not so anymore.

E.g. having used pdbpp before pytest captures output, and then having a
set_trace where pytest is capturing output, but the debugging plugin
(which suspends capturing) is not active yet (pytest_load_initial_conftests).

This will result in pdb raising BdbQuit then "correctly".

@blueyed
Copy link
Collaborator Author

blueyed commented Apr 30, 2019

Slightly related pytest issue pytest-dev/pytest#5189.

This is required for when the UnixConsole instance was created with
stdin being a terminal, but then later not so anymore.

E.g. having used pdbpp before pytest captures output
(`pdb.set_trace()`), and then continuing (`c`).
pytest is capturing output by now then, but the debugging plugin (which
suspends capturing) might not be active yet (pytest_load_initial_conftests).

This patch makes it raise `BdbQuit` then "correctly".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant