• Jeff Yoon's avatar
    Refactoring to be able to unit test parsing logic · 160ae59f
    Jeff Yoon authored
    The existing setup does not allow for unit testing the logic
    contained for arg parsing. Refactoring the existing setup, such
    that we can unit test those components in isolation.
    
    * Encapsulate argument parsing and test runner invocation in a
    Runner class.
    * Have __main__ create a Runner object, and call main(), which is
    the central coordinating method.
    test_args
    * Unit tests for the argument parsing logic.
    
    Change-Id: I3ca576f99aa7dc36b38579dbce40cd7ac4e67c36
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1975302
    Commit-Queue: Jeff Yoon <jeffyoon@chromium.org>
    Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#729527}
    160ae59f
run.py 11.6 KB