コード例 #1
0
 def _optional_author_string(self, author_emails):
     if not author_emails:
         return ""
     heading_string = plural(
         'author') if len(author_emails) > 1 else 'author'
     authors_string = join_with_separators(sorted(author_emails))
     return " (%s: %s)" % (heading_string, authors_string)
コード例 #2
0
 def _optional_author_string(self, author_emails):
     if not author_emails:
         return ""
     heading_string = plural('author') if len(author_emails) > 1 else 'author'
     authors_string = join_with_separators(sorted(author_emails))
     return " (%s: %s)" % (heading_string, authors_string)
コード例 #3
0
 def test_plural(self):
     self.assertEqual(plural("patch"), "patches")
     self.assertEqual(plural("test"), "tests")