Consolidate base classes for test suites.
Review Request #11822 — Created Sept. 27, 2021 and submitted
RBTools has had two base classes available for unit test suites: an
olderrbtools.utils.testbase.RBTestBase
, which contained all the
useful helper methods but should have been legacy, and
rbtools.testing.testcase.TestCase
, which contained very little but was
intended to be modern.This change consolidates the two. All the useful stuff from
RBTestBase
now lives inTestCase
, with some unused methods (reset_cl_args()
and
catch_output()
) removed.
gen_uuid()
was also removed, as it's not a generally-useful method,
and was only used in one test, which shouldn't have used it to begin
with.
RBTestBase
did set up a temporary home directory andchdir
to it,
which is functionality that wasn't worth removing, but shouldn't
necessarily be the default. For now,TestCase
now includes this
ability as an opt-in.The old
RBTestBase
is still around for now, for legacy test suites.
Many suites still need to be updated to useTestCase
. It also opts
into the temporary home directory, so that there aren't any regressions.
Unit tests pass.
Summary | ID |
---|---|
93049cd7faad279f48fb1e4c9db0674854104b3b |