-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add @allure.manual decorator to simplify ALLURE_MANUAL=True label set…
…ting (#688) * Added a decorator to simplify ALLURE_MANUAL=True label usage. Added tests for "allure.manual" decorator * Add dynamic `manual` label Co-authored-by: skhomuti <[email protected]>
- Loading branch information
Showing
6 changed files
with
50 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,16 @@ | ||
Test manual label | ||
------------- | ||
|
||
By default, ``ALLURE_MANUAL`` label is not set. | ||
|
||
Usage of ``allure.manual`` decorator. | ||
|
||
>>> import allure | ||
|
||
|
||
>>> @allure.manual | ||
... def test_manual(): | ||
... pass | ||
|
||
>>> def test_manual_dynamic(): | ||
... allure.dynamic.manual() |
Empty file.
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 @@ | ||
from hamcrest import assert_that | ||
from allure_commons_test.report import has_test_case | ||
from allure_commons_test.label import has_label | ||
|
||
|
||
def test_allure_manual_label(executed_docstring_path): | ||
""" ./examples/label/manual/allure_manual.rst """ | ||
assert_that(executed_docstring_path.allure_report, | ||
has_test_case("test_manual", | ||
has_label("ALLURE_MANUAL", True) | ||
) | ||
) | ||
|
||
|
||
def test_allure_manual_label_dynamic(executed_docstring_path): | ||
""" ./examples/label/manual/allure_manual.rst """ | ||
assert_that(executed_docstring_path.allure_report, | ||
has_test_case("test_manual_dynamic", | ||
has_label("ALLURE_MANUAL", True) | ||
), | ||
) |
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
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