From: Thomas Fillon Date: Mon, 21 Apr 2014 17:09:36 +0000 (+0200) Subject: Clean up test_decoding.py X-Git-Tag: 0.5.5~1^2~38^2~26 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=b9187cffe1d34bd579c28b377faf9ada596e635e;p=timeside.git Clean up test_decoding.py --- diff --git a/tests/test_decoding.py b/tests/test_decoding.py index 8a04376..057af4a 100755 --- a/tests/test_decoding.py +++ b/tests/test_decoding.py @@ -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: