From 615862e2a8465361634482d8f75f6fd27ff35aae Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Fri, 24 May 2024 12:49:49 +0900 Subject: [PATCH] Fix in tests/cmp_pcm.py for differing file lengths --- tests/cmp_pcm.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/cmp_pcm.py b/tests/cmp_pcm.py index e60f84e0a0..d958327ccd 100755 --- a/tests/cmp_pcm.py +++ b/tests/cmp_pcm.py @@ -44,7 +44,11 @@ def cmp_pcm(file1, file2, out_config, fs, get_mld=False, mld_lim=0, abs_tol=0) - f"file size in samples: file 1 = {s1.shape[0]},", f"file 2 = {s2.shape[0]}", ) - return 1, "FAIL: File lengths differ" + reason = "FAIL: File lengths differ. MAXIMUM ABS DIFF: None" + if get_mld: + reason += " - MLD: None" + + return 1, reason cmp_result = pyaudio3dtools.audioarray.compare( s1, s2, fs, per_frame=False, get_mld=get_mld -- GitLab