Пример #1
0
 def test_describe_non_ascii_unicode(self):
     string = _u("A\xA7")
     suffix = _u("B\xA7")
     mismatch = DoesNotStartWith(string, suffix)
     self.assertEqual("%s does not start with %s." % (
         text_repr(string), text_repr(suffix)),
         mismatch.describe())
Пример #2
0
 def test_describe_non_ascii_bytes(self):
     string = _b("A\xA7")
     suffix = _b("B\xA7")
     mismatch = DoesNotStartWith(string, suffix)
     self.assertEqual(
         "{!r} does not start with {!r}.".format(string, suffix),
         mismatch.describe())
Пример #3
0
 def test_describe_non_ascii_unicode(self):
     string = _u("A\xA7")
     suffix = _u("B\xA7")
     mismatch = DoesNotStartWith(string, suffix)
     self.assertEqual(
         "%s does not start with %s." %
         (text_repr(string), text_repr(suffix)), mismatch.describe())
Пример #4
0
 def test_describe_non_ascii_unicode(self):
     string = "A\xA7"
     suffix = "B\xA7"
     mismatch = DoesNotStartWith(string, suffix)
     self.assertEqual(
         "{} does not start with {}.".format(text_repr(string),
                                             text_repr(suffix)),
         mismatch.describe())
Пример #5
0
 def test_describe(self):
     mismatch = DoesNotStartWith("fo", "bo")
     self.assertEqual("'fo' does not start with 'bo'.", mismatch.describe())
Пример #6
0
 def test_describe_non_ascii_bytes(self):
     string = _b("A\xA7")
     suffix = _b("B\xA7")
     mismatch = DoesNotStartWith(string, suffix)
     self.assertEqual("%r does not start with %r." % (string, suffix),
         mismatch.describe())
Пример #7
0
 def test_describe(self):
     mismatch = DoesNotStartWith("fo", "bo")
     self.assertEqual("'fo' does not start with 'bo'.", mismatch.describe())