Delete the artwork file if the test failed

This commit is contained in:
Jack Wilsdon 2015-09-10 22:48:47 +01:00
parent 2f333968c5
commit b1cef2606b

View file

@ -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()