Beispiel #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)
Beispiel #2
0
 def description(self, conjugate=False):
     return "%s between %s and %s" % (to_be(conjugate), self.min, self.max)
Beispiel #3
0
 def description(self, conjugate=False):
     return "%s %s %s" % (to_be(conjugate), comparison_description,
                          serialize_value(self.expected))
Beispiel #4
0
 def description(self, conjugate=False):
     return "%s equal to %s" % (to_be(conjugate),
                                serialize_value(self.expected))
Beispiel #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
Beispiel #6
0
 def description(self, conjugate=False):
     return "%s %s" % (to_be(conjugate), self.wording)
Beispiel #7
0
 def description(self, conjugate=False):
     return "%s JSON:\n%s\n" % (to_be(conjugate), _format_json(
         self.expected))
Beispiel #8
0
 def description(self, conjugate=False):
     return "%s the text:\n<<<\n%s\n>>>\n" % (to_be(conjugate),
                                              self.expected)