MCPcopy Index your code
hub / github.com/pex-tool/pex / assert_output

Method assert_output

testing/__init__.py:453–466  ·  view source on GitHub ↗
(
        self,
        expected_output_re=None,  # type: Optional[str]
        expected_error_re=None,  # type: Optional[str]
        re_flags=0,  # type: int
    )

Source from the content-addressed store, hash-verified

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
469def create_pex_command(

Callers 2

assert_successMethod · 0.95
assert_failureMethod · 0.95

Calls 1

to_unicodeFunction · 0.90

Tested by

no test coverage detected