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 16
16
{distshare}/allure-python-commons-?.*.zip
17
17
pyhamcrest
18
18
mock
19
+ pytest-check
19
20
pytest-flakes
20
21
pytest-rerunfailures
21
22
pytest-xdist
@@ -38,6 +39,7 @@ setenv = ALLURE_INDENT_OUTPUT=yep
38
39
39
40
deps =
40
41
pyhamcrest
42
+ pytest-check
41
43
pytest-flakes
42
44
pytest-rerunfailures
43
45
pytest-xdist
You can’t perform that action at this time.
0 commit comments