From c4b05b3be51c07f82bae10e0415fc485f867552e Mon Sep 17 00:00:00 2001 From: Mahdi Ben Jelloul Date: Mon, 24 Mar 2025 13:12:31 +0100 Subject: [PATCH 1/3] Update changelog and version number --- openfisca_core/tools/test_runner.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openfisca_core/tools/test_runner.py b/openfisca_core/tools/test_runner.py index f04d4b585..5a9dd4472 100644 --- a/openfisca_core/tools/test_runner.py +++ b/openfisca_core/tools/test_runner.py @@ -239,7 +239,9 @@ def runtest(self) -> None: try: builder.set_default_period(period) self.simulation = builder.build_from_dict(self.tax_benefit_system, input) - except (VariableNotFound, SituationParsingError): + assert self.simulation is not None, 'Simulation should be properly initialized, Check your test input' + + except (VariableNotFound, SituationParsingError, AssertionError): raise except Exception as e: error_message = os.linesep.join( From 9fc381aaf6364cf2bc36d9cc3a3babb146faedd6 Mon Sep 17 00:00:00 2001 From: Mahdi Ben Jelloul Date: Thu, 9 Oct 2025 12:49:36 +0100 Subject: [PATCH 2/3] lint --- openfisca_core/tools/test_runner.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openfisca_core/tools/test_runner.py b/openfisca_core/tools/test_runner.py index 5a9dd4472..7012e5122 100644 --- a/openfisca_core/tools/test_runner.py +++ b/openfisca_core/tools/test_runner.py @@ -239,7 +239,9 @@ def runtest(self) -> None: try: builder.set_default_period(period) self.simulation = builder.build_from_dict(self.tax_benefit_system, input) - assert self.simulation is not None, 'Simulation should be properly initialized, Check your test input' + assert ( + self.simulation is not None + ), "Simulation should be properly initialized, Check your test input" except (VariableNotFound, SituationParsingError, AssertionError): raise From 6715d685283501289f0c61ea2312d690434c63e7 Mon Sep 17 00:00:00 2001 From: Mahdi Ben Jelloul Date: Thu, 9 Oct 2025 13:03:10 +0100 Subject: [PATCH 3/3] Bump --- CHANGELOG.md | 6 ++++++ setup.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 891bbe1dd..e991dc135 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 43.4.1 [#1341](https://github.com/openfisca/openfisca-core/pull/1341) + +#### Technical changes + +- Add a check for creating a simulation when building a test + ## 43.4.0 [#1334](https://github.com/openfisca/openfisca-core/pull/1334) #### New features diff --git a/setup.py b/setup.py index 8aa31c411..d9abcabca 100644 --- a/setup.py +++ b/setup.py @@ -70,7 +70,7 @@ setup( name="OpenFisca-Core", - version="43.4.0", + version="43.4.1", author="OpenFisca Team", author_email="contact@openfisca.org", classifiers=[