• 
      

    OutputWrapper class to Commands which outputs to stream object of choice

    Review Request #11401 — Created Jan. 23, 2021 and submitted — Latest diff uploaded

    Information

    RBTools
    master

    Reviewers

    RBTools commands were previously using print and 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 for OutputWrapper and another test that makes
    sure OutputWrapper passes the correct message to the output stream object

    Commits

    Files