forked from allure-framework/allure-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
vgorkavenko
committed
Mar 2, 2021
1 parent
b9384bf
commit 08ad48c
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
24 changes: 24 additions & 0 deletions
24
allure-pytest/test/integration/pytest_doctest/pytest_doctest_test.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,24 @@ | ||
import allure | ||
from hamcrest import assert_that | ||
from allure_commons_test.report import has_test_case | ||
from allure_commons_test.result import with_status | ||
|
||
|
||
@allure.feature("Integration") | ||
def test_pytest_flakes(allured_testdir): | ||
allured_testdir.testdir.makepyfile(""" | ||
def some_func(): | ||
\"\"\" | ||
>>> some_func() | ||
\"\"\" | ||
return True | ||
""") | ||
|
||
allured_testdir.run_with_allure("--doctest-modules") | ||
|
||
assert_that(allured_testdir.allure_report, | ||
has_test_case("some_func", | ||
with_status("passed")) | ||
) |