diff --git a/tests/test_electricity.py b/tests/test_electricity.py index 066e1853..99db96cb 100644 --- a/tests/test_electricity.py +++ b/tests/test_electricity.py @@ -44,8 +44,8 @@ def get_db(): return dummy_db, version -# This won't work with PRs because PRs from outside contributors -# don't have access to secrets (for good reason). +# This won't work with PRs because PRs from outside contributors don't have +# access to secrets (for good reason). if "IAM_FILES_KEY" in os.environ: key = os.environ["IAM_FILES_KEY"] else: @@ -78,6 +78,12 @@ def get_db(): ) +@pytest.mark.skipif(not key, reason="No access to decryption key") +def test_losses(): + assert len(el.network_loss) == 13 + assert np.isclose(el.network_loss["CAZ"]["high"]["transf_loss"], 0.0223586, rtol=1e-2) + + @pytest.mark.skipif(not key, reason="No access to decryption key") def test_powerplant_map(): s = el.powerplant_map["Biomass IGCC CCS"]