-
-
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.
summarize warning summaries if the number of locations is high
- Loading branch information
1 parent
f77d606
commit 23c43a3
Showing
4 changed files
with
63 additions
and
7 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 @@ | ||
Excess warning summaries are now collapsed per file to ensure readable display of warning summaries. |
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
21 changes: 21 additions & 0 deletions
21
testing/example_scripts/warnings/test_group_warnings_by_message_summary.py
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,21 @@ | ||
import warnings | ||
|
||
import pytest | ||
|
||
|
||
def func(): | ||
warnings.warn(UserWarning("foo")) | ||
|
||
|
||
@pytest.fixture(params=range(20), autouse=True) | ||
def repeat_hack(request): | ||
return request.param | ||
|
||
|
||
@pytest.mark.parametrize("i", range(5)) | ||
def test_foo(i): | ||
func() | ||
|
||
|
||
def test_bar(): | ||
func() |
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