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