import pathlib


def get_test_cases(which_subset):
    """Return a list of test case files."""
    assert which_subset in ("valid", "invalid")
    cwd = pathlib.Path(__file__).parent.resolve()
    test_dir = cwd / ".." / "demes-spec" / "test-cases" / which_subset
    files = [str(file) for file in test_dir.glob("*.yaml")]
    assert len(files) > 1
    return files