Ejemplo n.º 1
0
 def test_normalize_non_break_spaces(self):
     string = "\u00A0\t €\u202F \t"
     expected = " € "
     tools.assert_equal(expected, normalize_whitespace(string))
Ejemplo n.º 2
0
 def test_normalize_dont_trim(self):
     string = "  a b c d e f g h i j k l m n o p q r s ...  "
     expected = " a b c d e f g h i j k l m n o p q r s ... "
     tools.assert_equal(expected, normalize_whitespace(string))
Ejemplo n.º 3
0
 def test_normalize_newline_and_tab(self):
     string = "123 \n456\t\n"
     expected = "123 456 "
     tools.assert_equal(expected, normalize_whitespace(string))
Ejemplo n.º 4
0
 def test_normalize_non_break_spaces(self):
     string = "\u00A0\t €\u202F \t"
     expected = " € "
     assert expected == normalize_whitespace(string)
Ejemplo n.º 5
0
 def test_normalize_no_change(self):
     string = "a b c d e f g h i j k l m n o p q r s ..."
     tools.assert_equal(string, normalize_whitespace(string))
Ejemplo n.º 6
0
 def test_normalize_dont_trim(self):
     string = "  a b c d e f g h i j k l m n o p q r s ...  "
     expected = " a b c d e f g h i j k l m n o p q r s ... "
     assert expected == normalize_whitespace(string)
Ejemplo n.º 7
0
 def test_normalize_newline_and_tab(self):
     string = "123 \n456\t\n"
     expected = "123\n456\n"
     assert expected == normalize_whitespace(string)
Ejemplo n.º 8
0
 def test_normalize_non_break_spaces(self):
     string = "\u00A0\t €\u202F \t"
     expected = " € "
     assert expected == normalize_whitespace(string)
Ejemplo n.º 9
0
 def test_normalize_no_change(self):
     string = "a b c d e f g h i j k l m n o p q r s ..."
     assert string == normalize_whitespace(string)
Ejemplo n.º 10
0
 def test_normalize_dont_trim(self):
     string = "  a b c d e f g h i j k l m n o p q r s ...  "
     expected = " a b c d e f g h i j k l m n o p q r s ... "
     assert expected == normalize_whitespace(string)
Ejemplo n.º 11
0
 def test_normalize_newline_and_tab(self):
     string = "123 \n456\t\n"
     expected = "123\n456\n"
     assert expected == normalize_whitespace(string)
Ejemplo n.º 12
0
 def test_normalize_no_change(self):
     string = "a b c d e f g h i j k l m n o p q r s ..."
     assert string == normalize_whitespace(string)
Ejemplo n.º 13
0
 def test_normalize_non_break_spaces(self):
     string = "\u00A0\t €\u202F \t"
     expected = " € "
     tools.assert_equal(expected, normalize_whitespace(string))
Ejemplo n.º 14
0
 def test_normalize_newline_and_tab(self):
     string = "123 \n456\t\n"
     expected = "123 456 "
     tools.assert_equal(expected, normalize_whitespace(string))
Ejemplo n.º 15
0
 def test_normalize_dont_trim(self):
     string = "  a b c d e f g h i j k l m n o p q r s ...  "
     expected = " a b c d e f g h i j k l m n o p q r s ... "
     tools.assert_equal(expected, normalize_whitespace(string))
Ejemplo n.º 16
0
 def test_normalize_no_change(self):
     string = "a b c d e f g h i j k l m n o p q r s ..."
     tools.assert_equal(string, normalize_whitespace(string))