def test_failure_too_many_hours(): with pytest.raises(ValueError): calculate_net_load_peak(scenario, ["solar"], hours=100)
def test_failure_one_resource_not_present(): with pytest.raises(ValueError): calculate_net_load_peak(scenario, ["wind", "geothermal"], 10)
def test_failure_no_resources(): with pytest.raises(ValueError): calculate_net_load_peak(scenario, [], 10)
def test_failure_hours_type(): with pytest.raises(TypeError): calculate_net_load_peak(scenario, ["solar", "wind"], hours=10.0)
def test_failure_no_resources_present(): with pytest.raises(ValueError): calculate_net_load_peak(scenario, ["geothermal"], hours=10)
def test_calculate_net_load_peak_solar_wind_5(): capacity_value = calculate_net_load_peak(scenario, {"solar", "wind"}, 5) assert capacity_value == approx(7397.2)
def test_failure_resources_type_dict(): with pytest.raises(TypeError): calculate_net_load_peak(scenario, {"solar": "wind"}, hours=10)
def test_calculate_net_load_peak_solar_wind(): capacity_value = calculate_net_load_peak(scenario, {"solar", "wind"}, 10) assert capacity_value == approx(8211.5)
def test_calculate_net_load_peak_wind_5(): assert calculate_net_load_peak(scenario, {"wind"}, 5) == approx(3017.4)
def test_calculate_net_load_peak_wind(): assert calculate_net_load_peak(scenario, {"wind"}, 10) == approx(3370.8)
def test_calculate_net_load_peak_solar_5(): assert calculate_net_load_peak(scenario, {"solar"}, 5) == approx(2088.6)
def test_calculate_net_load_peak_solar(): assert calculate_net_load_peak(scenario, {"solar"}, 10) == approx(2535.2)