示例#1
0
 def test_trivial(self):
     self.assertEqual(remove_comment('hello world'), 'hello world')
示例#2
0
 def test_quoted_comment(self):
     self.assertEqual(
         remove_comment('hello world " # not a comment" # comment'),
         'hello world " # not a comment" ')
示例#3
0
 def test_hard_one(self):
     self.assertEqual(remove_comment(HARD_ONE),
                      'hello world "this # is #\' it" \'# not\' ')
示例#4
0
 def test_empty_comment(self):
     self.assertEqual(remove_comment('hello world #'), 'hello world ')
示例#5
0
 def test_escaped_comment(self):
     self.assertEqual(remove_comment('hello world \\#'), 'hello world \\#')
示例#6
0
 def test_trivial(self):
   self.assertEqual(remove_comment('hello world'), 'hello world')
示例#7
0
 def test_hard_one(self):
   self.assertEqual(remove_comment(HARD_ONE),
                    'hello world "this # is #\' it" \'# not\' ')
示例#8
0
 def test_quoted_comment(self):
   self.assertEqual(remove_comment('hello world " # not a comment" # comment'),
                    'hello world " # not a comment" ')
示例#9
0
 def test_escaped_comment(self):
   self.assertEqual(remove_comment('hello world \\#'), 'hello world \\#')
示例#10
0
 def test_empty_comment(self):
   self.assertEqual(remove_comment('hello world #'), 'hello world ')