Exemple #1
0
 def description(self, conjugate=False):
     if self._description:
         desc = "%s %s" % (to_be(conjugate), self._description)
         if self._mention_regexp:
             desc += ' (pattern: "%s")' % self.expected.pattern
         return desc
     else:
         return '%s "%s"' % ("matches pattern" if conjugate else
                             "to match pattern", self.expected.pattern)
Exemple #2
0
 def description(self, conjugate=False):
     return "%s between %s and %s" % (to_be(conjugate), self.min, self.max)
Exemple #3
0
 def description(self, conjugate=False):
     return "%s %s %s" % (to_be(conjugate), comparison_description,
                          serialize_value(self.expected))
Exemple #4
0
 def description(self, conjugate=False):
     return "%s equal to %s" % (to_be(conjugate),
                                serialize_value(self.expected))
Exemple #5
0
    def description(self, conjugate=False):
        ret = "%s %s" % (to_be(conjugate), self.type_name)
        if self.value_matcher:
            ret += " that %s" % self.value_matcher.description(conjugate=True)

        return ret
 def description(self, conjugate=False):
     return "%s %s" % (to_be(conjugate), self.wording)
Exemple #7
0
 def description(self, conjugate=False):
     return "%s JSON:\n%s\n" % (to_be(conjugate), _format_json(
         self.expected))
Exemple #8
0
 def description(self, conjugate=False):
     return "%s the text:\n<<<\n%s\n>>>\n" % (to_be(conjugate),
                                              self.expected)