Remove OptionsStub and support default client options in BaseSCMClient.

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

Information

RBTools
release-4.x

Reviewers

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.

Summary ID
Remove OptionsStub and support default client options in BaseSCMClient.
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.
628a31e921a012a4aa62abfc47d4ad2662a17fa1
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-4.x (490f35d)