Exemplo n.º 1
0
 def test_firstline(self):
     "Test firstline"
     for text, result in [
         ("", ""),
         ("first line\nsecond line", "first line"),
         ("\nsecond line", "second line"),
         ("\n\nthird line", "third line"),
         (" \nsecond line", "second line"),
     ]:
         with self.subTest(text=text, result=result):
             self.assertEqual(firstline(text), result)
Exemplo n.º 2
0
 def on_change_with_summary(self, name=None):
     return firstline(self.message or '')
Exemplo n.º 3
0
 def on_change_with_summary(self, name=None):
     return firstline(self.description or '')