Exemplo n.º 1
0
def test_query_IXSE_AR6():
    with pytest.raises(RuntimeError) as excinfo:
        variable = 'Emissions|CO2|Energy|Demand|Transportation'
        creds = dict(username='******', password='******')
        iiasa.read_iiasa('IXSE_AR6',
                         scenario='ADVANCE_2020_WB2C',
                         model='AIM/CGE 2.0',
                         region='World',
                         variable=variable,
                         creds=creds)
    assert str(excinfo.value).startswith('Login failed for user: mahamba')
Exemplo n.º 2
0
def test_query_IXSE_SR15():
    df = iiasa.read_iiasa(
        'IXSE_SR15',
        model='AIM*',
        scenario='ADVANCE_2020_Med2C',
        variable='Emissions|CO2',
        region='World',
    )
    assert len(df) == 20
Exemplo n.º 3
0
def test_query_IXSE_SR15_with_metadata():
    df = iiasa.read_iiasa(
        'IXSE_SR15',
        model='MESSAGEix*',
        variable=['Emissions|CO2', 'Primary Energy|Coal'],
        region='World',
        meta=['carbon price|2100 (NPV)', 'category'],
    )
    assert len(df) == 168
    assert len(df.data) == 168
    assert len(df.meta) == 7