Commit c523bb0a authored by norvell's avatar norvell
Browse files

Restore conftest.py. Require -ref_decoder_path for audio comparison in test_26444

parent 9cb4fc22
Loading
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -451,6 +451,9 @@ def ref_encoder_path(request) -> str:
    if request.config.option.ref_encoder_path:
        return request.config.option.ref_encoder_path

    if request.config.option.update_ref == "0":
        return None

    # assume specifically named encoder when update_ref is selected, but no ref_encoder_path is specified
    here = Path(__file__).parent.resolve()
    system = platform.system()
@@ -471,7 +474,7 @@ def ref_encoder_path(request) -> str:


@pytest.fixture(scope="function")
def ref_encoder_frontend(ref_encoder_path, request) -> EncoderFrontend:
def ref_encoder_frontend(ref_encoder_path, request) -> Union[None, EncoderFrontend]:
    """
    Return a :class:`conftest.EncoderFrontend` instance as REF for the test session.
    """
@@ -697,6 +700,9 @@ def ref_decoder_path(request) -> str:
    if request.config.option.ref_decoder_path:
        return request.config.option.ref_decoder_path

    if request.config.option.update_ref == "0":
        return None

    # assume specifically named decoder when update_ref is selected, but no ref_decoder_path is specified
    here = Path(__file__).parent.resolve()
    system = platform.system()
@@ -717,7 +723,7 @@ def ref_decoder_path(request) -> str:


@pytest.fixture(scope="function")
def ref_decoder_frontend(ref_decoder_path, request) -> DecoderFrontend:
def ref_decoder_frontend(ref_decoder_path, request) -> Union[None, DecoderFrontend]:
    """
    Return a :class:`conftest.DecoderFrontend` instance as DUT for the test session.
    """
+2 −1
Original line number Diff line number Diff line
@@ -136,7 +136,8 @@ def test_evs_26444(
        diff_opt = re.sub(pattern, '', diff_opt).strip()
        [ref, test] = diff_opt.split()[:2]
        # Run audio file comparison if MLD/SSNR/PEAQ is requested and the test is either a bitstream or audio (not JBM tracefile)
        if (get_mld or get_ssnr or get_odg) and ("COD" in ref or "OUT" in ref):
        # and the ref_decoder_path is specified (otherwise ref_decoder_frontend is None)
        if (get_mld or get_ssnr or get_odg) and ("COD" in ref or "OUT" in ref) and ref_decoder_frontend:
            if enc_opts:
                for file in [ref, test]:
                    output_config = "" # Empty for EVS operation