예제 #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, '\\')