diff --git a/CHANGELOG.md b/CHANGELOG.md index eb7e93d7c..cbe0ea672 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 43.4.3 [#1341](https://github.com/openfisca/openfisca-core/pull/1341) + +#### Technical changes + +- Add a check for creating a simulation when building a test + ### 43.4.2 [#1336](https://github.com/openfisca/openfisca-core/pull/1336) #### Technical changes diff --git a/openfisca_core/tools/test_runner.py b/openfisca_core/tools/test_runner.py index f04d4b585..7012e5122 100644 --- a/openfisca_core/tools/test_runner.py +++ b/openfisca_core/tools/test_runner.py @@ -239,7 +239,11 @@ 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( diff --git a/setup.py b/setup.py index 2ecf68cf8..512162ec2 100644 --- a/setup.py +++ b/setup.py @@ -70,7 +70,7 @@ setup( name="OpenFisca-Core", - version="43.4.2", + version="43.4.3", author="OpenFisca Team", author_email="contact@openfisca.org", classifiers=[