From 14634bbe3429a536e4b46f9e005974a45482b6e0 Mon Sep 17 00:00:00 2001 From: romainsacchi Date: Fri, 29 Nov 2024 18:56:07 +0100 Subject: [PATCH] Fix tests --- tests/test_process_ei310_cutoff.py | 7 ++++++- tests/test_process_ei310_cutoff_datapackage.py | 2 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/test_process_ei310_cutoff.py b/tests/test_process_ei310_cutoff.py index 2b2d5fbf..353cda01 100644 --- a/tests/test_process_ei310_cutoff.py +++ b/tests/test_process_ei310_cutoff.py @@ -41,13 +41,18 @@ def test_brightway(): biosphere_name=f"ecoinvent-{ei_version}-biosphere", ) + bw2data.projects.set_current(f"ecoinvent-{ei_version}-{system_model}") + + print(bw2data.projects.current) + print(bw2data.databases) + ndb = NewDatabase( scenarios=scenarios, source_db=f"ecoinvent-{ei_version}-{system_model}", source_version=ei_version, key=key, system_model=system_model, - biosphere_name=f"ecoinvent-{ei_version}-biosphere", + biosphere_name=[db for db in bw2data.databases if "biosphere" in db][0], ) ndb.update() diff --git a/tests/test_process_ei310_cutoff_datapackage.py b/tests/test_process_ei310_cutoff_datapackage.py index 60b69d63..284d2144 100644 --- a/tests/test_process_ei310_cutoff_datapackage.py +++ b/tests/test_process_ei310_cutoff_datapackage.py @@ -43,8 +43,6 @@ def test_brightway(): ) bw2data.projects.set_current(f"ecoinvent-{ei_version}-{system_model}") - print(bw2data.projects.current) - print(bw2data.databases) ndb = NewDatabase( scenarios=scenarios,