Example #1
0
  def test_unescape_token(self):
    escaped_token = u"Underline: \\u, Backslash: \\\\, Unicode: \\52;"

    unescaped_token = tokenizer._unescape_token(escaped_token)
    self.assertEqual(
        "Underline: _, Backslash: \\, Unicode: 4", unescaped_token)
Example #2
0
  def test_unescape_token(self):
    escaped_token = u"Underline: \\u, Backslash: \\\\, Unicode: \\52;"

    unescaped_token = tokenizer._unescape_token(escaped_token)
    self.assertEqual(
        "Underline: _, Backslash: \\, Unicode: 4", unescaped_token)