File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed
test/integration/pytest_check Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+
2+ import allure
3+ from allure_commons_test .report import has_test_case
4+ from allure_commons_test .result import with_status , with_message_contains , has_status_details
5+ from hamcrest import assert_that
6+
7+
8+ @allure .issue ("376" )
9+ @allure .feature ("Integration" )
10+ def test_pytest_check (allured_testdir ):
11+ """
12+ >>> import pytest_check as check
13+ >>> def test_pytest_check_example():
14+ ... check.equal(1, 2, msg="First failure")
15+ ... check.equal(1, 2, msg="Second failure")
16+ """
17+
18+ allured_testdir .parse_docstring_source ()
19+ allured_testdir .run_with_allure ()
20+
21+ assert_that (allured_testdir .allure_report ,
22+ has_test_case ("test_pytest_check_example" ,
23+ with_status ("failed" ),
24+ has_status_details (with_message_contains ("First failure" ),
25+ with_message_contains ("Second failure" ))
26+ ),
27+
28+ )
Original file line number Diff line number Diff line change 1616 {distshare}/allure-python-commons-?.*.zip
1717 pyhamcrest
1818 mock
19+ pytest-check
1920 pytest-flakes
2021 pytest-rerunfailures
2122 pytest-xdist
@@ -38,6 +39,7 @@ setenv = ALLURE_INDENT_OUTPUT=yep
3839
3940deps =
4041 pyhamcrest
42+ pytest-check
4143 pytest-flakes
4244 pytest-rerunfailures
4345 pytest-xdist
You can’t perform that action at this time.
0 commit comments