from pathlib import Path
import shutil


def get_config(repo_path: Path, filename: str) -> Path:
    """Get a config file, copied from the test directory into repo_path.

    :param repo_path: path to the repo into which to copy the config file.
    :param filename: name of the file from the test directory.
    :return: the path to the copied config file.
    """
    config_src = Path(__file__).parent / filename
    config_file = repo_path / config_src.name
    shutil.copy(config_src, config_file)
    return config_file