diff --git a/test/plugins/test_embedart.py b/test/plugins/test_embedart.py index ae66fbc6f..2b6f59e26 100644 --- a/test/plugins/test_embedart.py +++ b/test/plugins/test_embedart.py @@ -17,7 +17,6 @@ import os import os.path import shutil import tempfile -import time import unittest from unittest.mock import MagicMock, patch @@ -229,21 +228,19 @@ class EmbedartCliTest( item = album.items()[0] self.io.addinput("y") self.run_command("embedart", "-f", self.small_artpath) - embedded_time = item.current_mtime() - time.sleep(1) + embedded_time = os.path.getmtime(syspath(item.path)) self.io.addinput("y") self.run_command("clearart") mediafile = MediaFile(syspath(item.path)) assert not mediafile.images - clear_time = item.current_mtime() + clear_time = os.path.getmtime(syspath(item.path)) assert clear_time > embedded_time - time.sleep(1) # A run on a file without an image should not be modified self.io.addinput("y") self.run_command("clearart") - no_clear_time = item.current_mtime() + no_clear_time = os.path.getmtime(syspath(item.path)) assert no_clear_time == clear_time def test_clear_art_with_no_input(self):