Fix a handful of regressions/environment-dependent issues in unit tests.

Review Request #11947 — Created Jan. 31, 2022 and submitted

Information

Review Board
release-4.0.x

Reviewers

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/stderr capture code that was nose-specific. We
weren't capturing stdout at all, leaving that to nose. We now
capture both.

Some SVN common test mixin code was being executed under pytest. We now
set __test__ = False to 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-site output was testing results in a Python-specific way.

Some SSH key comparisons for the SCM tests compared against None using
==, which triggered a broken code path in paramiko. We now compare
using is.

Verified these fixed the corresponding unit tests in both the pytest and
nose test runners.

Summary ID
Fix a handful of regressions/environment-dependent issues in unit tests.
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`/`stderr` capture code that was `nose`-specific. We weren't capturing `stdout` at all, leaving that to `nose`. We now capture both. Some SVN common test mixin code was being executed under pytest. We now set `__test__ = False` to 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. Some SSH key comparisons for the SCM tests compared against `None` using `==`, which triggered a broken code path in `paramiko`. We now compare using `is`.
fd46dfded90652fe1035dc13da3f0f23d09bb61d
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-5.0.x (5a02100)