Skip to content

Commit cb6abeb

Browse files
author
bnestor
committed
updated linting. Removed uneccessary comments: formula is
( coal kgc02 * proportion of coal in the energy mix + petroleum kgc02 * proportion of petroleum in the energy mix + naturalGas kgc02 * proportion of natural gas in the energy mix) / total energy mix # not included are: fossil kgc02 * proportion of fossil in the energy mix + geothermal kgc02 * proportion of geothermal in the energy mix + hydroelectricity kgc02 * proportion of hydroelectricity in the energy mix + nuclear kgc02 * proportion of nuclear in the energy mix + solar kgc02 * proportion of solar in the energy mix + wind kgc02 * proportion of wind in the energy mix) / total energy mix * energy consumed
1 parent 3807a36 commit cb6abeb

1 file changed

Lines changed: 3 additions & 20 deletions

File tree

tests/test_emissions.py

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -154,26 +154,9 @@ def test_get_emissions_PRIVATE_INFRA_CANADA_WITH_REGION(self):
154154
country_iso_code="CAN", country_name="Canada", region="ontario"
155155
),
156156
)
157-
158-
# emissions should be a cross product of the ontario energy mix and the energy intensity
159-
# manually_computed_emissions = 3 * (0.995725971 * 0.0 + 0.8166885263 * 0.1 + 0.7438415916 * 8.6 + 0.635 * 0.0 + 0.038 * 0.0 + 0.026 * 23.4 + 0.029 * 50.1 + 0.048 * 5.2 + 0.026 * 11.7) / 100.1
160-
manually_computed_emissions = 3 * (0.995725971 * 0.0 + 0.8166885263 * 0.1 + 0.7438415916 * 8.6 ) / 100.1
161-
162-
163-
"""
164-
formula is
165-
( coal kgc02 * proportion of coal in the energy mix +
166-
petroleum kgc02 * proportion of petroleum in the energy mix +
167-
naturalGas kgc02 * proportion of natural gas in the energy mix) / total energy mix
168-
169-
# not included are:
170-
fossil kgc02 * proportion of fossil in the energy mix +
171-
geothermal kgc02 * proportion of geothermal in the energy mix +
172-
hydroelectricity kgc02 * proportion of hydroelectricity in the energy mix +
173-
nuclear kgc02 * proportion of nuclear in the energy mix +
174-
solar kgc02 * proportion of solar in the energy mix +
175-
wind kgc02 * proportion of wind in the energy mix) / total energy mix * energy consumed
176-
"""
157+
manually_computed_emissions = (
158+
3 * (0.995725971 * 0.0 + 0.8166885263 * 0.1 + 0.7438415916 * 8.6) / 100.1
159+
)
177160

178161
# THEN
179162
assert isinstance(emissions, float)

0 commit comments

Comments
 (0)