-
Notifications
You must be signed in to change notification settings - Fork 257
Open
Labels
task:new featureRequesting new capability or software featureRequesting new capability or software featuretheme:pytest
Description
I'm submitting a ...
- bug report
- feature request
- support request => Please do not submit support request here, see note at the top of this template.
What is the current behavior?
Allure-pytest plugin just show failure information if the test throws an exception.
allure-python/allure-pytest/src/listener.py
Lines 161 to 182 in 5e7bc86
| def pytest_runtest_makereport(self, item, call): | |
| uuid = self._cache.get(item.nodeid) | |
| report = (yield).get_result() | |
| test_result = self.allure_logger.get_test(uuid) | |
| status = get_pytest_report_status(report) | |
| status_details = None | |
| if call.excinfo: | |
| message = escape_non_unicode_symbols(call.excinfo.exconly()) | |
| if hasattr(report, 'wasxfail'): | |
| reason = report.wasxfail | |
| message = ('XFAIL {}'.format(reason) if reason else 'XFAIL') + '\n\n' + message | |
| trace = escape_non_unicode_symbols(report.longreprtext) | |
| status_details = StatusDetails( | |
| message=message, | |
| trace=trace) | |
| if (status != Status.SKIPPED | |
| and not (call.excinfo.errisinstance(AssertionError) | |
| or call.excinfo.errisinstance(pytest.fail.Exception))): | |
| status = Status.BROKEN |
What is the motivation / use case for changing the behavior?
Some useful plugins, like pytest-check, allow a non-fatal assertion behaviour modifying "report.longrepr" variable. "report.longrepr" could be valuable to get extra information in case of fail without exception information.
Please tell us about your environment:
- Allure version: 2.13.8
- Test framework: [email protected]
- Allure adaptor: [email protected]
Metadata
Metadata
Assignees
Labels
task:new featureRequesting new capability or software featureRequesting new capability or software featuretheme:pytest