示例#1
0
 def test_p_ws_newline_space_5_lf(self):
     self.check_parse_spec(p_ws_newline((5 * ' ') + common.LINEFEED))
示例#2
0
 def test_p_ws_newline__space_3__implicit_linefeed(self):
     self.check_parse_spec(p_ws_newline((3 * ' ')))
示例#3
0
 def test_p_ws_newline__exception__space_0_lf(self):
     with self.assertRaises(ValueError):
         p_ws_newline((0 * ' ') + common.LINEFEED)
         assert False, "ValueError not raised !"
示例#4
0
 def test_p_ws_newline__exception__extra_linefeed(self):
     with self.assertRaises(ValueError):
         p_ws_newline('  ' + (common.LINEFEED * 2))
         assert False, "ValueError not raised !"
示例#5
0
 def test_p_ws_newline__exception__lf_in_middle(self):
     with self.assertRaises(ValueError):
         p_ws_newline(' ' + (common.LINEFEED + ' '))
         assert False, "ValueError not raised !"
示例#6
0
 def test_p_ws_newline__exception__empty_string(self):
     with self.assertRaises(ValueError):
         p_ws_newline('')
         assert False, "ValueError not raised !"
示例#7
0
 def test_p_ws_newline__exception__None(self):
     with self.assertRaises(ValueError):
         p_ws_newline(None)
         assert False, "ValueError not raised !"