From 3e75d5cf06ccccc18077b9cce2072d4dd6c3267c Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Wed, 19 Aug 2015 00:40:46 +0200 Subject: [PATCH] audio: Update missing plugins check in scanner tests --- tests/audio/test_scan.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/audio/test_scan.py b/tests/audio/test_scan.py index dff753d9..8c2b9af3 100644 --- a/tests/audio/test_scan.py +++ b/tests/audio/test_scan.py @@ -40,8 +40,11 @@ class ScannerTest(unittest.TestCase): self.assertEqual(self.result[name].tags[key], value) def check_if_missing_plugin(self): - if any(['missing a plug-in' in str(e) for e in self.errors.values()]): - raise unittest.SkipTest('Missing MP3 support?') + for path, result in self.result.items(): + if not path.endswith('.mp3'): + continue + if not result.playable and result.mime == 'audio/mpeg': + raise unittest.SkipTest('Missing MP3 support?') def test_tags_is_set(self): self.scan(self.find('scanner/simple'))