OutputWrapper class to Commands which outputs to stream object of choice
Review Request #11401 — Created Jan. 23, 2021 and submitted — Latest diff uploaded
RBTools commands were previously using
sys.stderr
to output messages. This change abstracting outputting by using a
wrapper around a stream output object. This makes it easier to customize
output streams and suppress output. 4 wrappers (2 for standard output
unicode and byte, 2 for standard error unicode and byte) are initiated
in the Command class that is accessible to all child classes.
Ran all tests in
./tests/runtests.py rbtools.commands
and passed.Added two new tests for
__init__.py
. One that tests if output stream
object is set correctly forOutputWrapper
and another test that makes
sureOutputWrapper
passes the correct message to the output stream object
Diff Revision 9
This is not the most recent revision of the diff. The latest diff is revision 16. See what's changed.
Commits
Files
rbtools/commands/__init__.py |
---|
rbtools/commands/alias.py |
---|
rbtools/commands/api_get.py |
---|
rbtools/commands/attach.py |
---|
rbtools/commands/close.py |
---|
rbtools/commands/diff.py |
---|
rbtools/commands/info.py |
---|
rbtools/commands/land.py |
---|
rbtools/commands/patch.py |
---|
rbtools/commands/post.py |
---|
rbtools/commands/publish.py |
---|
rbtools/commands/setup_completion.py |
---|
rbtools/commands/setup_repo.py |
---|
rbtools/commands/stamp.py |
---|
rbtools/commands/status.py |
---|
rbtools/commands/status_update.py |
---|
rbtools/commands/tests/test_main.py |
---|