Fix a handful of regressions/environment-dependent issues in unit tests.
Review Request #11947 — Created Jan. 31, 2022 and submitted — Latest diff uploaded
This corrects some problems in our test suites that have recently been
uncovered, some of which were found during the move to pytest.We had some
stdout/stderrcapture code that wasnose-specific. We
weren't capturingstdoutat all, leaving that tonose. We now
capture both.Some SVN common test mixin code was being executed under pytest. We now
set__test__ = Falseto avoid this.The new versions of Haystack regressed a test, due to an attempt to spy
on a function wrapped in a misbehaving decorator (which did not preserve
the function name). This is addressed in kgb 7 through the new
func_name=argument, which is now used by this test.A check for
rb-siteoutput was testing results in a Python-specific way.Some SSH key comparisons for the SCM tests compared against
Noneusing
==, which triggered a broken code path inparamiko. We now compare
usingis.
Verified these fixed the corresponding unit tests in both the pytest and
nose test runners.