예제 #1
0
 def testRemoveLineBreaks(self):
     """
     tests that _removeLineBreaks functions properly
     """
     for index, comment in enumerate(self.comments_list):
         new_comment = _removeLineBreaks(comment)
         new_comment_lines = len(new_comment.strip().splitlines())
         self.assertEqual(new_comment_lines, self.expected_lines[index],
                          'Found {} more lines than expected for comment \n\n""{}""\n\n which converted to \n\n""{}""'.format(new_comment_lines - self.expected_lines[index],comment.strip(), new_comment.strip()))
예제 #2
0
 def testRemoveLineBreaks(self):
     """
     tests that _removeLineBreaks functions properly
     """
     for index, comment in enumerate(self.comments_list):
         new_comment = _removeLineBreaks(comment)
         new_comment_lines = len(new_comment.strip().splitlines())
         self.assertEqual(new_comment_lines, self.expected_lines[index],
                          'Found {} more lines than expected for comment \n\n""{}""\n\n which converted to \n\n""{}""'.format(new_comment_lines - self.expected_lines[index],comment.strip(), new_comment.strip()))