Add a unit test utility function for building a SCMClient.
Review Request #12501 — Created Aug. 5, 2022 and submitted
This introduces a
SCMClientTestCase.build_client()method. Together, this enables unit
tests to easily and consistently build a
Upcoming changes will begin migrating unit tests away from creating
setUp(), and instead move them into the individual tests.
There are a couple of reasons for this:
SCMClientsetup is soon going to become a two-stage process. First,
initialization, and then a call to
setup(). Some tests will need to
run with that second stage, and some will need to run without it. We
don't want to have to construct these more than once per test.
2) We already are constructing more than once per test in some cases,
when we provide other arguments to the client constructor.
build_client()supports taking parsed command line options
SCMClientconstructor parameters. Soon, it will be
updated to take additional flags for controlling setup. Some test suites
may also wrap
build_client()to provide more specific setup.
Unit tests pass, but this is currently not used.
Tested this with some upcoming unit test work.
Updated to target RBTools 4.0.
Revision 2 (+84)