Fix test state leakages causing failures if subvertpy isn't installed.

Review Request #12154 — Created March 15, 2022 and submitted — Latest diff uploaded

Information

Review Board
release-5.0.x

Reviewers

The SVN unit tests change the test backend in setUp(), and restore the
old state in tearDown(). Or, they're supposed to. If a backend isn't
installed (such as subvertpy on Python 3.8+), we raise a SkipTest.
This actually bypasses tearDown(), meaning we keep the old test
settings.

This eventually impacts other tests that depend on a working SVN
backend.

We now handle the management of the backend in setUpClass() and
tearDownClass(), which won't be affected by the SkipTest. This
reduces the work that needs to be done per-test, and ensures we'll end
up with the original state once the tests have completed.

All unit tests pass without subvertpy installed.

Commits

Files

    Loading...