(
self,
expected_output_re=None, # type: Optional[str]
expected_error_re=None, # type: Optional[str]
re_flags=0, # type: int
)
| 451 | self.assert_output(expected_output_re, expected_error_re, re_flags) |
| 452 | |
| 453 | def assert_output( |
| 454 | self, |
| 455 | expected_output_re=None, # type: Optional[str] |
| 456 | expected_error_re=None, # type: Optional[str] |
| 457 | re_flags=0, # type: int |
| 458 | ): |
| 459 | if expected_output_re: |
| 460 | assert re.match(expected_output_re, self.output, flags=re_flags), to_unicode( |
| 461 | "Failed to match re: {re!r} against:\n{output}" |
| 462 | ).format(re=expected_output_re, output=self.output) |
| 463 | if expected_error_re: |
| 464 | assert re.match(expected_error_re, self.error, flags=re_flags), to_unicode( |
| 465 | "Failed to match re: {re!r} against:\n{output}" |
| 466 | ).format(re=expected_error_re, output=self.error) |
| 467 | |
| 468 | |
| 469 | def create_pex_command( |
no test coverage detected