Commit 7938e4b2 authored by sbsarac's avatar sbsarac
Browse files

Use Union to support multiple types

parent 43ee8ce9
Loading
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -139,9 +139,6 @@ def test_dynamic_acoustic_environment(
    rend_config_path = TEST_VECTOR_DIR.joinpath(f"rend_config_combined.cfg")
    rend_config_path.with_stem(f"rend_config")
    
    aeid_path = Path(aeid)
    aeid_path.with_stem(aeid)
    
    run_renderer(
        record_property,
        test_info,
@@ -152,7 +149,7 @@ def test_dynamic_acoustic_environment(
        get_mld=get_mld,
        mld_lim=get_mld_lim,
        config_file=rend_config_path,
        aeid=aeid_path,        
        aeid=aeid,        
    )

@pytest.mark.create_ref
+7 −3
Original line number Diff line number Diff line
@@ -33,9 +33,10 @@
import filecmp
import logging
import os
from pathlib import Path
import subprocess as sp
import sys
from typing import Dict, Optional
from typing import Dict, Optional, Union

import numpy as np
import pytest
@@ -164,7 +165,7 @@ def run_renderer(
    get_mld=False,
    mld_lim=0,
    get_mld_lim=0,
    aeid: Optional[str] = None,
    aeid: Optional[Union[Path, int]] = None,
) -> str:
    # prepare arguments and filepaths
    if trj_file is not None:
@@ -198,7 +199,10 @@ def run_renderer(
        framing_name = ""

    if aeid is not None:
        if isinstance(aeid, Path):
            aeid_name = f"_{aeid.stem}"
        else:
            aeid_name = aeid
    else:
        aeid_name = ""