コード例 #1
0
 def pytest_terminal_summary(self, terminalreporter: TerminalReporter,
                             exitstatus: ExitCode, config: Config) -> None:
     if self.exception:
         terminalreporter.ensure_newline()
         terminalreporter.section('Jira XRAY', sep='-', red=True, bold=True)
         terminalreporter.write_line(
             'Could not publish results to Jira XRAY!')
         if self.exception.message:
             terminalreporter.write_line(self.exception.message)
     else:
         if self.issue_id and self.logfile:
             terminalreporter.write_sep(
                 '-',
                 f'Generated XRAY execution report file: {Path(self.logfile).absolute()}'
             )
         elif self.issue_id:
             terminalreporter.write_sep(
                 '-',
                 f'Uploaded results to JIRA XRAY. Test Execution Id: {self.issue_id}'
             )