diff --git a/tests/renderer/utils.py b/tests/renderer/utils.py index a538df7ee83c6a771fbf992e0aad18c2ef0bdfc4..d569fff6c7e74675bd04636ace9f818d5a202c0a 100644 --- a/tests/renderer/utils.py +++ b/tests/renderer/utils.py @@ -41,10 +41,19 @@ import numpy as np import pytest from .compare_audio import compare_audio_arrays -from .constants import * +from .constants import ( + SCRIPTS_DIR, + OUTPUT_PATH_REF, + OUTPUT_PATH_CUT, + FORMAT_TO_FILE_COMPARETEST, + FORMAT_TO_FILE_SMOKETEST, + RENDERER_CMD, + BIN_SUFFIX_MERGETARGET, +) sys.path.append(SCRIPTS_DIR) from pyaudio3dtools.audiofile import readfile +from .. import cmp_pcm # fixture returns test information, enabling per-testcase SNR @@ -70,7 +79,7 @@ def check_BE( cut: np.ndarray, cut_fs: int, xfail: bool = False, - atol: int = 2 + atol: int = 2, ): if ref is None or np.array_equal(ref, np.zeros_like(ref)): pytest.fail("REF signal does not exist or is zero!") @@ -117,6 +126,7 @@ def run_renderer( hrtf_file: Optional[str] = None, get_mld=False, mld_lim=0, + get_mld_lim=0, ) -> str: # prepare arguments and filepaths if trj_file is not None: @@ -238,6 +248,8 @@ def run_renderer( out_file_ref = str(OUTPUT_PATH_REF.joinpath(out_file_stem)) if get_mld: + # see constants.py + ref_fs = cmd[10] output_differs, reason = cmp_pcm( out_file, out_file_ref,