-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7364 from nicoddemus/parseoutcomes-plural-6505
assertoutcomes() only accepts plural forms
- Loading branch information
Showing
4 changed files
with
80 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
``Testdir.run().parseoutcomes()`` now always returns the parsed nouns in plural form. | ||
|
||
Originally ``parseoutcomes()`` would always returns the nouns in plural form, but a change | ||
meant to improve the terminal summary by using singular form single items (``1 warning`` or ``1 error``) | ||
caused an unintended regression by changing the keys returned by ``parseoutcomes()``. | ||
|
||
Now the API guarantees to always return the plural form, so calls like this: | ||
|
||
.. code-block:: python | ||
result = testdir.runpytest() | ||
result.assert_outcomes(error=1) | ||
Need to be changed to: | ||
|
||
|
||
.. code-block:: python | ||
result = testdir.runpytest() | ||
result.assert_outcomes(errors=1) |
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