Exemplo n.º 1
0
 def test_mismatch_unicode(self):
     matcher = EqualsIgnoringWhitespace(u"one \t two \n \u1234  ")
     mismatch = matcher.match(u" one \r \u1234 ")
     self.assertEqual(
         u"u'one two \\u1234' != u'one \\u1234'",
         mismatch.describe())
Exemplo n.º 2
0
 def test_match_non_string(self):
     matcher = EqualsIgnoringWhitespace(1234)
     self.assertIs(None, matcher.match(1234))
Exemplo n.º 3
0
 def test_mismatch_str(self):
     matcher = EqualsIgnoringWhitespace("one \t two \n three")
     mismatch = matcher.match(" one \r three ")
     self.assertEqual(
         "'one two three' != 'one three'",
         mismatch.describe())
Exemplo n.º 4
0
 def test_match_unicode(self):
     matcher = EqualsIgnoringWhitespace(u"one \t two \n \u1234  ")
     self.assertIs(None, matcher.match(u" one \r two     \u1234 "))
Exemplo n.º 5
0
 def test_match_non_string(self):
     matcher = EqualsIgnoringWhitespace(1234)
     self.assertIs(None, matcher.match(1234))
Exemplo n.º 6
0
 def test_match_str(self):
     matcher = EqualsIgnoringWhitespace("one \t two \n three")
     self.assertIs(None, matcher.match(" one \r two     three "))
Exemplo n.º 7
0
 def test_mismatch_unicode(self):
     matcher = EqualsIgnoringWhitespace(u"one \t two \n \u1234  ")
     mismatch = matcher.match(u" one \r \u1234 ")
     self.assertEqual(
         u"u'one \\u1234' != u'one two \\u1234'",
         mismatch.describe())
Exemplo n.º 8
0
 def test_match_unicode(self):
     matcher = EqualsIgnoringWhitespace(u"one \t two \n \u1234  ")
     self.assertIs(None, matcher.match(u" one \r two     \u1234 "))
Exemplo n.º 9
0
 def test_mismatch_str(self):
     matcher = EqualsIgnoringWhitespace("one \t two \n three")
     mismatch = matcher.match(" one \r three ")
     self.assertEqual(
         "'one three' != 'one two three'",
         mismatch.describe())
Exemplo n.º 10
0
 def test_match_str(self):
     matcher = EqualsIgnoringWhitespace("one \t two \n three")
     self.assertIs(None, matcher.match(" one \r two     three "))
Exemplo n.º 11
0
 def test_str(self):
     matcher = EqualsIgnoringWhitespace("abc")
     self.assertEqual("EqualsIgnoringWhitespace('abc')", str(matcher))