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

Allow silencing of predict_tile stdout based on verbose flag #878

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

Conversation

henrykironde
Copy link
Contributor

No description provided.

@bw4sz
Copy link
Collaborator

bw4sz commented Jan 9, 2025

@henrykironde what was the secret here, before I merge.

@bw4sz bw4sz self-requested a review January 9, 2025 14:49
@henrykironde
Copy link
Contributor Author

@bw4sz @ethanwhite, while this solution works, it's not ideal. The script relies on keeping the console output clean to force the test to pass, which feels like a workaround. It's challenging to make verbose=False tests pass reliably since other output (beyond the expected print statements) might be present.

        if mosaic:
             # Suppress output if not verbose
             if not verbose:
                 f = io.StringIO()
                 with contextlib.redirect_stdout(f):

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