def assert_student_repos_match_templates( student_teams: List[plug.StudentTeam], template_repo_names: List[str], repos: List[localapi.Repo], ): """Assert that the content of the student repos matches the content of the respective template repos. """ repos_dict = {repo.name: repo.path for repo in repos} _assert_repos_match_templates( student_teams, template_repo_names, funcs.template_repo_hashes(), repos_dict, )
def assert_cloned_student_repos_match_templates( student_teams: List[plug.StudentTeam], template_repo_names: List[str], workdir: pathlib.Path, ): repos_dict = { plug.generate_repo_name(team.name, template_repo_name): workdir / team.name / plug.generate_repo_name(team.name, template_repo_name) for team in student_teams for template_repo_name in template_repo_names } _assert_repos_match_templates( student_teams, template_repo_names, funcs.template_repo_hashes(), repos_dict, )