From 9883fe5be0e403359c9a57de9d73ef6c4160a331 Mon Sep 17 00:00:00 2001 From: Flowtter Date: Fri, 19 May 2023 11:17:54 +0200 Subject: [PATCH] feat: Add abs in mp3 tests --- crispy-api/tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crispy-api/tests/conftest.py b/crispy-api/tests/conftest.py index a129b5e..4d60a51 100644 --- a/crispy-api/tests/conftest.py +++ b/crispy-api/tests/conftest.py @@ -166,7 +166,7 @@ def is_same_audio(self, file_path, expected_file_path): audio = MP3(file_path) expected_audio = MP3(expected_file_path) - assert audio.info.length - expected_audio.info.length < 0.1 + assert abs(audio.info.length - expected_audio.info.length) < 0.1 def is_same_csv(self, file_path, expected_file_path): with open(expected_file_path, "r") as e: