def test_unfeasible_problem_01__warning_dry(study_path, check_runner): warnings_on_weeks = [] warnings_on_weeks.append(weeks_in_year(year=3, weeks=[19])) warnings_on_weeks.append(weeks_in_year(year=6, weeks=[42, 43, 49])) warnings_on_weeks.append(weeks_in_year(year=7, weeks=[19])) warnings_on_weeks.append(weeks_in_year(year=8, weeks=[19])) checks = check_list() checks.add( check=unfeasible_problem(study_path, new_behavior="warning-dry", checks_on_weeks=warnings_on_weeks, simulation=check_runner.get_simulation())) check_runner.run(checks)
def test_unfeasible_problem_01__error_dry(study_path, check_runner): errors_on_weeks = [] errors_on_weeks.append(weeks_in_year(year=3, weeks=[19])) checks = check_list() checks.add( check=unfeasible_problem(study_path, new_behavior="error-dry", checks_on_weeks=errors_on_weeks, simulation=check_runner.get_simulation())) check_runner.run(checks)
def make_list_of_weeks(weeks_in_year_data): checks_on_weeks = [] for item in weeks_in_year_data: checks_on_weeks.append(weeks_in_year(year=item["year"], weeks=item["weeks"])) return checks_on_weeks