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.
Hi @aguschin,
I've completed the pull request for #265.
I've implemented a similar fix for MLEM and further details can be found here: iterative/mlem#410
I've completed the following updates:
stderr_echo
to print tostderr
.Exception
andGTOException
tostderr
as opposed tostdout
using thestderr_echo
context manager.conftest.py
with aRunner
class similar to the MLEM project. So thatCliRunner
instances will be created with standard parameters such asmixed_stderr=False
. With this implementation, we will guarantee that theresult
object will havestderr
andstdout
properties.Runner
pytest fixture, similar to the MLEM project, however, no tests are using it currently. I've added it for future use cases.Exception
andGTOException
are printed tostderr
._check_output_contains(output: str, search_value: str) -> bool:
and_check_output_exact_match(output: str, search_value: str) -> bool
._check_successful_cmd
and_check_failing_cmd
should comparestderr
andstdout
with their expected output.stderr
thegto
application adds the colour red to the output, which prevents exact match._check_output_contains
allows us to match a substring, correcting the issue.