From b1cef2606b8e568f1d9fec56b2c038d9dceee661 Mon Sep 17 00:00:00 2001 From: Jack Wilsdon Date: Thu, 10 Sep 2015 22:48:47 +0100 Subject: [PATCH] Delete the artwork file if the test failed --- test/test_embedart.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/test_embedart.py b/test/test_embedart.py index 5130643bb..a4c88a429 100644 --- a/test/test_embedart.py +++ b/test/test_embedart.py @@ -97,7 +97,10 @@ class EmbedartCliTest(_common.TestCase, TestHelper): config['embedart']['remove_art_file'] = True self.run_command('embedart') - self.assertFalse(os.path.isfile(tmp_path)) + + if os.path.isfile(tmp_path): + os.remove(tmp_path) + self.fail('Artwork file {0} was not deleted'.format(tmp_path)) def test_art_file_missing(self): self.add_album_fixture()