-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Noticed this when running unit tests. The error message was being printed to stderr. Now the test catches and verifies the error message. I also updated the existing tests to: * Use mock.patch. Otherwise test failures will leave sys.stdout monkey patched and could affect subsequent tests. * Also replaced the output.find() calls with assertIn(). This will give a detailed error message that includes the original output. Also the tests were checking against '!= 1', but find() return -1 if the substr is not found in the str.
- Loading branch information
Showing
1 changed file
with
23 additions
and
23 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