def describe_mismatch(self, actual, mismatch_description: Description) -> None: mismatch_description.append_text("got HTML with tag") if self.name: mismatch_description.append_text(" name=").append_description_of( self.name) if self.id_: mismatch_description.append_text(" id=").append_description_of( self.id_) found = self.findall(actual) mismatch_description.append_list(" values [", ", ", "]", [repr(t) for t in found])
def describe_to(self, description: Description) -> None: description.append_list("(", " and ", ")", self.matchers)
def describe_mismatch(self, mock: Mock, mismatch_description: Description) -> None: mismatch_description.append_list("got calls [", ", ", "]", [str(c) for c in mock.mock_calls])
def describe_to(self, description: Description) -> None: description.append_list("a string containing ", ", ", " in order", self.substrings)