Commit 21c124f1 authored by Anika Treffehn's avatar Anika Treffehn
Browse files

formatting

parent 1ab95464
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ def create_error_pattern(
        gen_patt(100, "ep.g192", 5, working_dir=tmp_dir_test)
        if not tmp_sta_file_test.exists():
            raise RuntimeError(
                "Used version of gen-patt was detected to be faulty (unable to write \"sta\"-file). See bin/README.md for details."
                'Used version of gen-patt was detected to be faulty (unable to write "sta"-file). See bin/README.md for details.'
            )

    with TemporaryDirectory() as tmp_dir:
+4 −2
Original line number Diff line number Diff line
@@ -30,10 +30,10 @@
#  the United Nations Convention on Contracts on the International Sales of Goods.
#

from copy import copy
from pathlib import Path
from tempfile import TemporaryDirectory
from warnings import warn
from copy import copy

import numpy as np

@@ -77,7 +77,9 @@ def p50fbmnru(

    # resample signal to 48kHz
    if input.fs != 48000:
        warn("P.50 Fullband MNRU requires a sampling rate of 48kHz. Resampling will be applied")
        warn(
            "P.50 Fullband MNRU requires a sampling rate of 48kHz. Resampling will be applied"
        )
        tmp_audio_obj.audio = resample_itu(tmp_audio_obj, 48000)
        tmp_audio_obj.fs = 48000

+3 −1
Original line number Diff line number Diff line
@@ -241,7 +241,9 @@ def preprocess(cfg, logger):
        and cfg.preprocessing_2.get("concatenate_input", False)
        and cfg.preprocessing_2.get("concatenation_order", None) is not None
    ):
        cfg.items_list = reorder_items_list(cfg.items_list, cfg.preprocessing_2["concatenation_order"])
        cfg.items_list = reorder_items_list(
            cfg.items_list, cfg.preprocessing_2["concatenation_order"]
        )

    if cfg.metadata_path[0] is not None:
        for item_idx in range(len(cfg.metadata_path)):
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ from pathlib import Path

import pytest

from .constants import OUTPUT_PATH_CUT, OUTPUT_PATH_REF, INPUT_PATH_CONCATENATION
from .constants import OUTPUT_PATH_CUT, OUTPUT_PATH_REF


@pytest.fixture(scope="session", autouse=True)
+13 −2
Original line number Diff line number Diff line
@@ -31,11 +31,22 @@
#

import pytest

from ivas_processing_scripts.utils import find_binary

BINARIES = ["bs1770demo", "p50fbmnru", "esdru", "eid-xor", "gen-patt", "filter", "random", "networkSimulator_g192", "masaRenderer"]
BINARIES = [
    "bs1770demo",
    "p50fbmnru",
    "esdru",
    "eid-xor",
    "gen-patt",
    "filter",
    "random",
    "networkSimulator_g192",
    "masaRenderer",
]


@pytest.mark.parametrize("binary", BINARIES)
def test_find_binary(binary):
    assert(find_binary(binary, raise_error=False) is not None)
    assert find_binary(binary, raise_error=False) is not None
Loading