Beispiel #1
0
 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])
Beispiel #2
0
 def describe_to(self, description: Description) -> None:
     description.append_list("(", " and ", ")", self.matchers)
Beispiel #3
0
 def describe_mismatch(self, mock: Mock,
                       mismatch_description: Description) -> None:
     mismatch_description.append_list("got calls [", ", ", "]",
                                      [str(c) for c in mock.mock_calls])
Beispiel #4
0
 def describe_to(self, description: Description) -> None:
     description.append_list("a string containing ", ", ", " in order", self.substrings)