]> git.parisson.com Git - timeside.git/commitdiff
Clean up test_decoding.py
authorThomas Fillon <thomas@parisson.com>
Mon, 21 Apr 2014 17:09:36 +0000 (19:09 +0200)
committerThomas Fillon <thomas@parisson.com>
Mon, 21 Apr 2014 17:09:36 +0000 (19:09 +0200)
tests/test_decoding.py

index 8a043768534d5980897130641820c1ab5f2d3965..057af4a033c885df289da18e6ed059a19b85a93c 100755 (executable)
@@ -125,10 +125,9 @@ class TestDecoding(unittest.TestCase):
 
         self.assertEqual(decoder.mime_type(), self.expected_mime_type)
 
-        try:
-            self.assertIn(totalframes, [self.expected_totalframes, self.expected_totalframes +32])
-        except AssertionError:
-            self.assertEqual(totalframes, self.expected_totalframes + 32)    
+        expected_totalframes = [self.expected_totalframes, self.expected_totalframes +32]  # +32 to handle some issue with ogg
+        self.assertIn(totalframes, expected_totalframes)
+        
         input_duration = decoder.input_totalframes / decoder.input_samplerate
         output_duration = decoder.totalframes() / decoder.output_samplerate
         if self.test_exact_duration: