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

Prevent stdout/stderr capture on headless mode #3441

Closed
wants to merge 6 commits into from

Conversation

darrenburns
Copy link
Member

@darrenburns darrenburns commented Oct 2, 2023

Debugging tests got much harder since recent stdout/stderr capturing changes, since we can no longer print inside them. The prints get captured by Textual, meaning they don't make it as far as the pytest output.

I think when running apps headless, we want to allow prints to make it through, but I may be missing broader context on the print capturing changes that went in.

I've confirmed allows the print output to make it to the pytest output as expected.

@willmcgugan thoughts on this?

Edit - a test is failing but that's expected. I won't look to resolve that test until we agree on direction for this.

@willmcgugan
Copy link
Collaborator

I think not capturing in headless mode probably should be the default. But we do have a mechaniam now where the dev can capture prints and decide what to do with them, so I feel there should also be an option to do a headless run with capturing enabled.

@darrenburns
Copy link
Member Author

Should adding a mechanism to toggle capturing in headless mode be done in this PR?

@willmcgugan
Copy link
Collaborator

May as well. Feels like a small change.

@darrenburns darrenburns closed this Oct 9, 2023
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.

2 participants