Пример #1
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
Пример #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
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
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)