* morituri/image/image.py:

* morituri/test/test_image_image.py:
	  Add a task for calculating frame length of an audio file.
	  Add a test for it.
This commit is contained in:
Thomas Vander Stichele
2009-04-12 10:20:14 +00:00
parent b7eb47325e
commit 27fd2f16e6
3 changed files with 60 additions and 0 deletions

View File

@@ -45,4 +45,13 @@ class KingsSeparateTestCase(unittest.TestCase):
self.assertEquals(h(crctask.crcs[2]), '0xd63dc2d2')
self.assertEquals(h(crctask.crcs[3]), '0x7271db39')
class AudioLengthTestCase(unittest.TestCase):
def testLength(self):
path = os.path.join(os.path.dirname(__file__), 'track.flac')
t = image.AudioLengthTask(path)
runner = task.SyncRunner()
runner.run(t, verbose=False)
self.assertEquals(t.length, 5880)