Closed joguSD closed 7 years ago
-- .-""-.
) ( )
( ) (
/ )
(_ _) 0_,-.__
(_ )_ |_.-._/
( ) |_--..\
(__) |__--_/
|'' ``\ |
| \ | /b.
| \ ,,,---===?A`\ | ,==y'
___,,,,,---==""\ |M] \ | ;|\ |>
_ _ \ ___,|H,,---==""""bno,
o O (_) (_) \ / _ AWAW/
/ _(+)_ dMM/
\@_,,,,,,---==" \ \\|// MW/
--''''" === d/
//
,'__________________________
\ \ \ \ ,/~~~~~~~~~~~~~~~~~~~~~~~~~~~
_____ ,' ~~~ .-""-.~~~~~~ .-""-.
.-""-. ///==--- /`-._ ..-' -.__..-'
`-.__..-' =====\\\\\\ V/ .---\.
~~~~~~~~~~~~, _',--/_.\ .-""-.
.-""-.___` -- \| -.__..-
prompt_toolkit
updated to version 1.0.4 which adds an assertion that theinput
/output
given to aCommandLineInterface
be a TTY. This assertion happens at object instantiation which affects the way we do some of our integration tests.We currently have some tests in
integration\test_keys.py
andintegration\test_selectmenu.py
that instantiate CLIs and simulate key presses to them by callingfeed
andprocess_keys
. This is used to test that key bindings are properly registered and have the correct results on the state of the CLI. However, the CLI'srun
method is not called, meaning that the actual input and output streams seem to not be used. This is what allowed the tests to function previously. Now that there are assertions to verify that theinput
andoutput
are TTYs at instantiation the tests fail immediately. This can be fixed by passingInput
andOutput
objects that don't rely onstdin
andstdout
.This is what the fix would like. For
test_keys.py
we would next to change theAWSShell
to pass a pluggableinput
andoutput
when it creates it's CLI.@JordonPhillips @jamesls