Loading tests/renderer/utils.py +14 −2 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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!") Loading Loading @@ -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: Loading Loading @@ -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, Loading Loading
tests/renderer/utils.py +14 −2 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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!") Loading Loading @@ -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: Loading Loading @@ -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, Loading