Fix some test skipping issues.

Review Request #11871 — Created Nov. 10, 2021 and submitted — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

There are two issues with test skipping that I ran into with my
work-in-progress M1 configuration:

  1. Perforce tests were set up to skip if the P4 module wasn't available,
    but at some point we had an import of P4Exception snuck in that
    wasn't properly guarded. This change makes it so that we properly
    skip the test without hitting ImportError.
  2. Once upon a time, paramiko just allowed SocketError to raise when
    port 22 was closed, but now it has its own error class.

Ran unit tests.

Diff Revision 2 (Latest)

orig
1
2

Commits

First Last Summary ID Author
Fix some test skipping issues.
There are two issues with test skipping that I ran into with my work-in-progress M1 configuration: 1. Perforce tests were set up to skip if the P4 module wasn't available, but at some point we had an import of P4Exception snuck in that wasn't properly guarded. This change makes it so that we properly skip the test without hitting `ImportError`. 2. Once upon a time, paramiko just allowed `SocketError` to raise when port 22 was closed, but now it has its own error class. Testing Done: Ran unit tests.
f1a9a680513d413bffc5d747f615562a913e7865 David Trowbridge
reviewboard/scmtools/tests/test_perforce.py
reviewboard/scmtools/tests/testcases.py
Loading...