Exemplo n.º 1
0
 def test_unescape(self):
     # cases covered by string_escape:
     self.assertEqual(counter_unescape(r'\n'), '\n')
     self.assertEqual(counter_unescape(r'\\'), '\\')
     # cases covered by manual unescape:
     self.assertEqual(counter_unescape(r'\.'), '.')
     self.assertRaises(ValueError, counter_unescape, '\\')
Exemplo n.º 2
0
 def test_unescape(self):
     # cases covered by string_escape:
     self.assertEqual(counter_unescape(r'\n'), '\n')
     self.assertEqual(counter_unescape(r'\\'), '\\')
     # cases covered by manual unescape:
     self.assertEqual(counter_unescape(r'\.'), '.')
     self.assertRaises(ValueError, counter_unescape, '\\')