def test_fixed_summary(): vma_dict = vma.generate_vma_dict(datadir) v = vma_dict['Testing Fixed Summary'] (avg, high, low) = v.avg_high_low() assert (avg, high, low) == (2.0, 3.0, 1.0)
from model import co2calcs from model import customadoption from model import dd from model import emissionsfactors from model import firstcost from model import helpertables from model import operatingcost from model import s_curve from model import unitadoption from model import vma from model import tam from solution import rrs DATADIR = str(pathlib.Path(__file__).parents[2].joinpath('data')) THISDIR = pathlib.Path(__file__).parents[0] VMAs = vma.generate_vma_dict(THISDIR.joinpath('vma_data')) units = { "implementation unit": "TW", "functional unit": "TWh(th)", "first cost": "US$B", "operating cost": "US$B", } name = 'Solar Hot Water' solution_category = ac.SOLUTION_CATEGORY.REDUCTION scenarios = ac.load_scenarios_from_json(directory=THISDIR.joinpath('ac'), vmas=VMAs) class SolarHotWater:
def test_generate_vma_dict(): vma_dict = vma.generate_vma_dict(datadir) assert len(vma_dict) == 2 assert 'Current Adoption' in vma_dict