示例#1
0
文件: test_parse.py 项目: Asana/mrjob
 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, '\\')
示例#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, '\\')