diff --git a/tests/cmp_pcm.py b/tests/cmp_pcm.py index 709c8ddb8dfc5ac4307e82452122f6b96d3183b2..e60f84e0a04986af130f7b7204bffa6efec576b2 100755 --- a/tests/cmp_pcm.py +++ b/tests/cmp_pcm.py @@ -20,7 +20,8 @@ def cmp_pcm(file1, file2, out_config, fs, get_mld=False, mld_lim=0, abs_tol=0) - print("=====================") out_config = "MONO" if out_config == "" else out_config - if out_config.upper() not in pyivastest.constants.OC_TO_NCHANNELS: + # out_config may be a string or a Path. Wrap in str() to avoid error in case it is a Path. + if str(out_config).upper() not in pyivastest.constants.OC_TO_NCHANNELS: out_config_in_file_names = os.path.splitext(os.path.basename(out_config))[0] nchannels = ( pyivastest.IvasScriptsCommon.IvasScript.get_n_channels_from_ls_layout(