Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove message keyword argument in pytest.raises and pytest.warns (#602)
* Remove message kwarg in pytest.raises and pytest.warns In pytest.raises, the message argument has been used to provide a test failure message, but it has gotten confused with the match argument which is used to check the message from the exception to be tested so it is being deprecated. I changed the usage to: with pytest.fails(SomeException): should_raise_exception() pytest.fails("should_raise_exception() did not raise anything") Also, we had pytest.warns(..., message="...") at one point, though it appears pytest.warns does not do anything with the message kwarg to begin with. That had to be changed into a grumpier try except block. * Improve a failure message when using pytest.warns * Fix bug when using pytest.warns in parsing.py * Fix bug when testing missing warnings
- Loading branch information
Showing
7 changed files
with
73 additions
and
54 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
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
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