Loading tests/test_experiments.py +10 −1 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ def setup_input_files_for_config(config): dummy_md_files = FORMAT_TO_METADATA_FILES.get(input_fmt, list()) # copy input files files_copied = list() for f in dummy_input_files: f_out = input_path.joinpath(f.name).resolve().absolute() # need at least 2s of input files for gen-patt to be happy (can not keep the tolerance for 50 frames only) Loading @@ -86,6 +87,8 @@ def setup_input_files_for_config(config): md_f_out = ".".join([str(f_out), suffix]) shutil.copy(md_f, md_f_out) files_copied.append(f_out.name) # create background noise files with white noise if "background_noise" in config.preprocessing_2: # always set the same seed to have reproducible test noises Loading @@ -98,6 +101,8 @@ def setup_input_files_for_config(config): ).absolute() write(bg_noise_path, noise) return files_copied def all_lengths_equal(cfg): output_folder = cfg.output_path Loading Loading @@ -132,7 +137,11 @@ def test_generate_test_items(exp_lab_pair): args = Arguments(str(cfg)) config = TestConfig(cfg) setup_input_files_for_config(config) input_filenames = setup_input_files_for_config(config) # patch concatenation order if config.preprocessing_2.get("concatenate_input", None) is not None: config.preprocessing_2["concatenation_order"] = sorted(input_filenames) generate_test(args) if not all_lengths_equal(config): Loading Loading
tests/test_experiments.py +10 −1 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ def setup_input_files_for_config(config): dummy_md_files = FORMAT_TO_METADATA_FILES.get(input_fmt, list()) # copy input files files_copied = list() for f in dummy_input_files: f_out = input_path.joinpath(f.name).resolve().absolute() # need at least 2s of input files for gen-patt to be happy (can not keep the tolerance for 50 frames only) Loading @@ -86,6 +87,8 @@ def setup_input_files_for_config(config): md_f_out = ".".join([str(f_out), suffix]) shutil.copy(md_f, md_f_out) files_copied.append(f_out.name) # create background noise files with white noise if "background_noise" in config.preprocessing_2: # always set the same seed to have reproducible test noises Loading @@ -98,6 +101,8 @@ def setup_input_files_for_config(config): ).absolute() write(bg_noise_path, noise) return files_copied def all_lengths_equal(cfg): output_folder = cfg.output_path Loading Loading @@ -132,7 +137,11 @@ def test_generate_test_items(exp_lab_pair): args = Arguments(str(cfg)) config = TestConfig(cfg) setup_input_files_for_config(config) input_filenames = setup_input_files_for_config(config) # patch concatenation order if config.preprocessing_2.get("concatenate_input", None) is not None: config.preprocessing_2["concatenation_order"] = sorted(input_filenames) generate_test(args) if not all_lengths_equal(config): Loading