Tests: Add comprehensive tests for silent flag in subshells#1407
Closed
pankaj-bind wants to merge 0 commit intoipython:mainfrom
Closed
Tests: Add comprehensive tests for silent flag in subshells#1407pankaj-bind wants to merge 0 commit intoipython:mainfrom
pankaj-bind wants to merge 0 commit intoipython:mainfrom
Conversation
Collaborator
|
@pankaj-bind Could you rebase this, there have been some changes that might make the tests more robust. |
Contributor
Author
|
@ianthomas23 ok |
b964381 to
efd53d7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In this update I have added tests for the
silentflag inexecute_request, particularly within the context of subshells and concurrent execution.The
silentflag is a critical feature for controlling output in clients like Jupyter notebooks. While the core functionality was previously addressed, there were no specific tests to ensure its reliability in more complex scenarios involving subshells.This commit adds a new test case,
test_silent_flag_in_subshells, totests/test_subshells.pywhich:silent=Truecorrectly suppresses all output-related IOPub messages (likestreamorexecute_result) for code executed in the main shell.statusmessages, which are sent regardless of the silent flag, while ensuring no other output is generated.Ensuring the
silentflag's reliability in subshells is crucial for preventing unexpected output flooding in notebooks and other clients. These tests lock in the correct behavior, improve the project's test coverage, and will prevent future regressions in this critical area, leading to a more predictable and improved user experience.