openfisca / openfisca-core

OpenFisca core engine. See other repositories for countries-specific code & data.
https://openfisca.org
GNU Affero General Public License v3.0
170 stars 75 forks source link

Informative error message when a test runs on an indexed parameter with values only specified after test date #1096

Open MaxGhenis opened 2 years ago

MaxGhenis commented 2 years ago

See the IndexError in this test run. The trace shows some functions like check_homogeneous_nodes.

This test failed because the policy parameter was specified starting at 2021-05-12 but the test was for 2021. Changing the test to 2022 in https://github.com/PolicyEngine/openfisca-us/pull/399/commits/e5a134f7bb8466f3d2319cad5b997d73afcb4cdd resolved it.

Elsewhere I've seen this error message:

openfisca_core.errors.parameter_not_found_error.ParameterNotFoundError: The parameter 'fcc.ebb[categorical_eligibility]' was not found in the 2021-01-01 tax and benefit system.

I think it might not have shown up in this case because the parameter it's calling is smart-indexed, but I haven't made a MWE to check.