def _fill_case(self, report, call, pyteststatus, status):
        """
        Finalizes with important data
        :param report: py.test's `TestReport`
        :param call: py.test's `CallInfo`
        :param pyteststatus: the failed/xfailed/xpassed thing
        :param status: a :py:class:`allure.constants.Status` entry
        """
        [self.attach(name, contents, AttachmentType.TEXT) for (name, contents) in dict(report.sections).items()]

        self.test.stop = now()
        self.test.status = status

        if status in FAILED_STATUSES:
            self.test.failure = Failure(message=get_exception_message(call.excinfo, pyteststatus, report),
                                        trace=report.longrepr or hasattr(report, 'wasxfail') and report.wasxfail)
        elif status in SKIPPED_STATUSES:
            skip_message = type(report.longrepr) == tuple and report.longrepr[2] or report.wasxfail
            trim_msg_len = 89
            short_message = skip_message.split('\n')[0][:trim_msg_len]

            # FIXME: see pytest.runner.pytest_runtest_makereport
            self.test.failure = Failure(message=(short_message + '...' * (len(skip_message) > trim_msg_len)),
                                        trace=status == Status.PENDING and report.longrepr or short_message != skip_message and skip_message or '')
dataset/ETHPy150Open allure-framework/allure-python/allure/pytest_plugin.py/AllureTestListener._fill_case/original