コード例 #1
0
ファイル: waste_treatment.py プロジェクト: Python3pkg/Ocelot
def test_allocate_paper_dataset_treatment_ds(paper):
    treatment, electricity, heat = waste_treatment_allocation(paper)
    same_metadata(treatment, paper)
    treatment_rp = treatment['exchanges'][0]
    assert treatment_rp['name'] == 'waste graphical paper'
    assert treatment_rp['type'] == 'reference product'
    assert treatment_rp['amount'] == -1

    first_dropped = treatment['exchanges'][1]
    assert first_dropped['name'] == 'electricity, for reuse in municipal waste incineration only'
    assert first_dropped['type'] == 'dropped product'
    assert first_dropped['amount'] == 0

    second_dropped = treatment['exchanges'][2]
    assert second_dropped['name'] == 'heat, for reuse in municipal waste incineration only'
    assert second_dropped['type'] == 'dropped product'
    assert second_dropped['amount'] == 0

    second_dropped = treatment['exchanges'][2]
    assert second_dropped['name'] == 'heat, for reuse in municipal waste incineration only'
    assert second_dropped['type'] == 'dropped product'
    assert second_dropped['amount'] == 0

    assert len(treatment['exchanges']) == 7
    assert treatment['exchanges'][4]['amount'] == 0.14823
コード例 #2
0
def test_allocate_paper_dataset_treatment_ds(paper):
    treatment, electricity, heat = waste_treatment_allocation(paper)
    same_metadata(treatment, paper)
    treatment_rp = treatment['exchanges'][0]
    assert treatment_rp['name'] == 'waste graphical paper'
    assert treatment_rp['type'] == 'reference product'
    assert treatment_rp['amount'] == -1

    first_dropped = treatment['exchanges'][1]
    assert first_dropped['name'] == 'electricity, for reuse in municipal waste incineration only'
    assert first_dropped['type'] == 'dropped product'
    assert first_dropped['amount'] == 0

    second_dropped = treatment['exchanges'][2]
    assert second_dropped['name'] == 'heat, for reuse in municipal waste incineration only'
    assert second_dropped['type'] == 'dropped product'
    assert second_dropped['amount'] == 0

    second_dropped = treatment['exchanges'][2]
    assert second_dropped['name'] == 'heat, for reuse in municipal waste incineration only'
    assert second_dropped['type'] == 'dropped product'
    assert second_dropped['amount'] == 0

    assert len(treatment['exchanges']) == 7
    assert treatment['exchanges'][4]['amount'] == 0.14823
コード例 #3
0
ファイル: waste_treatment.py プロジェクト: Python3pkg/Ocelot
def test_allocate_paper_dataset_heat_ds(paper):
    treatment, electricity, heat = waste_treatment_allocation(paper)
    same_metadata(heat, paper)
    assert len(heat['exchanges']) == 1

    rp = heat['exchanges'][0]
    assert rp['name'] == 'heat, for reuse in municipal waste incineration only'
    assert rp['type'] == 'reference product'
    assert rp['amount'] == 1
コード例 #4
0
def test_allocate_paper_dataset_heat_ds(paper):
    treatment, electricity, heat = waste_treatment_allocation(paper)
    same_metadata(heat, paper)
    assert len(heat['exchanges']) == 1

    rp = heat['exchanges'][0]
    assert rp['name'] == 'heat, for reuse in municipal waste incineration only'
    assert rp['type'] == 'reference product'
    assert rp['amount'] == 1
コード例 #5
0
ファイル: waste_treatment.py プロジェクト: Python3pkg/Ocelot
def test_allocation_function_output_valid(paper):
    for new_ds in waste_treatment_allocation(paper):
        assert dataset_schema(new_ds)
コード例 #6
0
def test_allocation_function_output_valid(paper):
    for new_ds in waste_treatment_allocation(paper):
        assert dataset_schema(new_ds)