From b9187cffe1d34bd579c28b377faf9ada596e635e Mon Sep 17 00:00:00 2001 From: Thomas Fillon Date: Mon, 21 Apr 2014 19:09:36 +0200 Subject: [PATCH] Clean up test_decoding.py --- tests/test_decoding.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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: -- 2.39.5