Skip to content

Commit

Permalink
All in month
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainipp committed Jan 25, 2024
1 parent 40ecad9 commit 0432a1f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions openfisca_survey_manager/tests/test_calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,9 @@ def test_simulation_calibration_input_from_data():
"household": "household_weight",
}
survey_scenario.set_tax_benefit_systems(dict(baseline = tax_benefit_system))
survey_scenario.period = 2017
survey_scenario.period = '2017-01'
survey_scenario.used_as_input_variables = ['salary', 'rent', 'household_weight']
period = periods.period('2017')
period1 = periods.period('2017-01')
period = periods.period('2017-01')
target_rent_aggregate = 200000

data = {
Expand All @@ -116,5 +115,4 @@ def test_simulation_calibration_input_from_data():
for simulation_name, simulation in survey_scenario.simulations.items():
assert simulation.weight_variable_by_entity == weight_variable_by_entity, f"{simulation_name} weight_variable_by_entity does not match {weight_variable_by_entity}"
assert (survey_scenario.calculate_series("household_weight", period, simulation = simulation_name) != 0).all()
assert_near(simulation.compute_aggregate("rent", period = period1), target_rent_aggregate)
return survey_scenario

0 comments on commit 0432a1f

Please sign in to comment.