forked from robbrad/UKBinCollectionData
-
Notifications
You must be signed in to change notification settings - Fork 0
/
conftest.py
20 lines (17 loc) · 837 Bytes
/
conftest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
## 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