Remove OptionsStub and support default client options in BaseSCMClient.

Review Request #12531 — Created Aug. 16, 2022 and submitted — Latest diff uploaded

chipx86
RBTools
release-4.x
rbtools

The SCMClient unit tests have been using an old OptionsStub in
rbtools.tests (the only thing in that module) to define default
options for a while. This hasn't been kept up-to-date, missing a lot of
defaults that specific tests have had to provide. It also doesn't play
well with type annotations, and isn't worth fixing to do so.

SCMClientTestCase now supports default options that are used in calls
to build_client(). There are set of global defaults
(DEFAULT_SCMCLIENT_OPTIONS) that will always be applied, and a
per-suite set of defaults (default_scmclient_options) that can be set.

These can then be overridden via build_client() as before.

OptionsStub is no longer being used, and will emit a deprecation
warning. We'll remove it in 5.0.

All unit tests pass.

Commits

Files

Loading...