From 8c909157d50d303437ba37a9f7e414d6bf3e7d58 Mon Sep 17 00:00:00 2001 From: LorenzoFerraces Date: Sun, 14 Jan 2024 11:26:04 -0300 Subject: [PATCH] corrected milisecond precision in get_file_modification_time tests --- mezcla/tests/test_system.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mezcla/tests/test_system.py b/mezcla/tests/test_system.py index 4b5fb871..8b5bcfea 100755 --- a/mezcla/tests/test_system.py +++ b/mezcla/tests/test_system.py @@ -568,8 +568,8 @@ def test_get_file_modification_time(self): filedir1 = gh.create_temp_file('test modified time') filedir2 = gh.create_temp_file('test modified time2') # get the modification time of the files - timestamp1 = THE_MODULE.get_file_modification_time(filedir1) - timestamp2 = THE_MODULE.get_file_modification_time(filedir2) + timestamp1 = THE_MODULE.get_file_modification_time(filedir1)[:19] + timestamp2 = THE_MODULE.get_file_modification_time(filedir2)[:19] # get and format local time timestampNow = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) @@ -577,7 +577,7 @@ def test_get_file_modification_time(self): assert timestamp1 == timestamp2 # test timestamp is equal to actual time (ignoring miliseconds) - assert timestamp1[:19] == timestampNow + assert timestamp1 == timestampNow def test_remove_extension(self): """Ensure remove_extension works as expected"""