forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make stream capturing test class opportunistic
In Qiskit#5071 we tried to fix an implicit testing requirement dependency we added in Qiskit#3982 for capturing output streams from test runs. However, that change didn't go far enough in making the capture features opt-in. While it fixed the hard failure it still made the installation of testtools and fixtures hard requirement for running tests, even if the stream capturing was never used. For an example of this see Qiskit#5078. This commit attempts to remedy this situation by making the stream capturing opportunistically opt-in. It splits out the common functionality between the old test class without stream capturing into a new common base class. Then it adds the stream capturing base class on top of that. The stream capturing class is only used if testtools and fixtures is installed and QISKIT_CAPTURE_STREAMS is not set.
- Loading branch information
Showing
3 changed files
with
87 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters