コード例 #1
0
ファイル: unit_tests.py プロジェクト: gcapizzi/freitag
 def test_format(self):
     tags = {'artist': 'Bob Marley', 'title': 'One Love'}
     template = FreiTemplate('   %artist - %title   ')
     self.assertEquals('Bob Marley - One Love', template.format(tags))
コード例 #2
0
 def run(self, args):
     songs = self.get_songs(args.files)
     template = FreiTemplate(args.format)
     for song in songs:
         print template.format(song)
コード例 #3
0
ファイル: unit_tests.py プロジェクト: berdario/freitag
 def test_format(self):
     tags = {'artist': 'Bob Marley', 'title': 'One Love'}
     template = FreiTemplate('   %artist - %title   ')
     self.assertEquals('Bob Marley - One Love', template.format(tags))