-
-
Notifications
You must be signed in to change notification settings - Fork 37
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 #150 from hirotoKirimaru/main
Add short test summary info result message
- Loading branch information
Showing
3 changed files
with
29 additions
and
1 deletion.
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,11 @@ | ||
from pytest_check import check | ||
|
||
|
||
def test_baseline(): | ||
a, b = 1, 2 | ||
check.equal(a, b) | ||
|
||
|
||
def test_message(): | ||
a, b = 1, 2 | ||
check.equal(a, b, f"comment about a={a} != b={b}") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
def test_baseline(pytester): | ||
pytester.copy_example("examples/test_example_short_test_summary_info.py") | ||
result = pytester.runpytest("-k baseline") | ||
result.stdout.fnmatch_lines(["*FAILED*-*FAILURE*"]) | ||
|
||
|
||
def test_message(pytester): | ||
pytester.copy_example("examples/test_example_short_test_summary_info.py") | ||
result = pytester.runpytest("-k message") | ||
result.stdout.fnmatch_lines(["*FAILED*-*FAILURE*"]) |