def test_determine_months_in_a_peak_demand_pricing_period_valid(): months_in_a_period = C0.determine_months_in_a_peak_demand_pricing_period( 4, 365) assert ( months_in_a_period == 3 ), f"The duration, ie. months of the peak demand pricing periods, are calculated incorrectly."
def test_determine_months_in_a_peak_demand_pricing_period_not_valid(): with pytest.raises(C0.InvalidPeakDemandPricingPeriods): C0.determine_months_in_a_peak_demand_pricing_period( 5, 365 ), f"No C0.InvalidPeakDemandPricingPeriods is raised eventhough an invalid number of pricing periods is requested."