can you try with relative path?
like you get your current path within test_script.py with command like:
cur_path = os.getcwd()
then get the path to config.yaml with a relative path like:
config_path = os.path.abspath(os.path.join(cur_path, f"../config/config.yaml"))