Merged
Conversation
1bacc0c to
0984a10
Compare
kdaily
commented
Jan 27, 2026
|
|
||
| def test_watcher_accepts_use_color_parameter(self, watcher_app_session): | ||
| @pytest.mark.parametrize("use_color", [True, False]) | ||
| def test_watcher_accepts_use_color_parameter(self, ptk_app_session, use_color): |
Member
Author
There was a problem hiding this comment.
Need to investigate a bit as to why this specific test requires the ptk_app_session fixture and an injected Display object.
Member
Author
There was a problem hiding this comment.
In this module, this is the only test where a display is initialized inside of a ECSExpressGatewayServiceWatcher. The only other test using ECSExpressGatewayServiceWatcher, test_invalid_display_mode_raises_error, errors out expectedly with an invalid mode before creating a display.
kdaily
commented
Jan 27, 2026
tests/unit/customizations/ecs/test_monitorexpressgatewayservice.py
Outdated
Show resolved
Hide resolved
0984a10 to
cf87509
Compare
Test initialization fails on some systems due to not having stdin, specifically when the test suite is invoked within a script. Reference: https://python-prompt-toolkit.readthedocs.io/en/stable/pages/advanced_topics/unit_testing.html It also replaces some PTK app session fixtures with one that already existed in `tests/conftest.py` that has the correct behavior (`ptk_app_session`).
cf87509 to
08f9263
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.
Issue #, if available:
NA
Description of changes:
Test initialization fails on some systems due to not having stdin, specifically when the test suite is invoked within a script.
Reference: https://python-prompt-toolkit.readthedocs.io/en/stable/pages/advanced_topics/unit_testing.html
It also replaces some PTK app session fixtures with one that already existed in
tests/conftest.pythat has the correct behavior:aws-cli/tests/conftest.py
Line 41 in 95805a1
Last, it combines two tests into one parametrized one over values of the use color mode.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.