-
Notifications
You must be signed in to change notification settings - Fork 111
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 #404 from robbrad/403-improve-unittest-coverage
fix: unit test coverage
- Loading branch information
Showing
2 changed files
with
54 additions
and
23 deletions.
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 |
---|---|---|
@@ -1,20 +0,0 @@ | ||
## Needed to temp fix this issue | ||
## https://github.com/allure-framework/allure-python/issues/636 | ||
from allure_commons.lifecycle import AllureLifecycle | ||
from allure_commons.model2 import TestResult | ||
from allure_commons import plugin_manager | ||
|
||
def custom_write_test_case(self, uuid=None): | ||
test_result = self._pop_item(uuid=uuid, item_type=TestResult) | ||
if test_result: | ||
if test_result.parameters: | ||
adj_parameters = [] | ||
for param in test_result.parameters: | ||
if param.name != '_pytest_bdd_example': | ||
# do not include parameters with "_pytest_bdd_example" | ||
adj_parameters.append(param) | ||
test_result.parameters = adj_parameters | ||
|
||
plugin_manager.hook.report_result(result=test_result) | ||
|
||
AllureLifecycle.write_test_case = custom_write_test_case | ||
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