Пример #1
0
 def test_valid(self):
   """The function returns lyric lines separated with newlines."""
   contents = ('[ar:foo]\n'
               '[ti:bar]\n'
               '[00:00.00]First line\n'
               '[01:01.01]Second line\n')
   expected = ('First line\n'
               'Second line')
   self.assertEqual(expected, gecime.extract_lyrics(contents))
Пример #2
0
 def test_invalid(self):
   """The function returns an empty string when given invalid input."""
   self.assertEqual('', gecime.extract_lyrics(''))
   self.assertEqual('', gecime.extract_lyrics('[]\nblah\n'))