Fix test state leakages causing failures if subvertpy isn't installed.
Review Request #12154 — Created March 15, 2022 and submitted — Latest diff uploaded
The SVN unit tests change the test backend in
setUp()
, and restore the
old state intearDown()
. Or, they're supposed to. If a backend isn't
installed (such assubvertpy
on Python 3.8+), we raise aSkipTest
.
This actually bypassestearDown()
, 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 theSkipTest
. 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.