Skip to content

Commit

Permalink
Again
Browse files Browse the repository at this point in the history
  • Loading branch information
benjello committed Oct 9, 2023
1 parent 8043732 commit aa7d451
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions openfisca_survey_manager/tests/test_scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,22 +351,22 @@ def test_inflate():
def test_compute_pivot_table():
survey_scenario = create_randomly_initialized_survey_scenario(collection = None)
period = "2017-01"
pivot_table = survey_scenario.compute_pivot_table(columns = ['age'], values = ["salary"], period = period)
pivot_table = survey_scenario.compute_pivot_table(columns = ['age'], values = ["salary"], period = period, simulation = "baseline")

assert pivot_table.index == "salary"
assert pivot_table.values.round() == 21748

del survey_scenario.weight_variable_by_entity
survey_scenario.set_weight_variable_by_entity()
pivot_table = survey_scenario.compute_pivot_table(columns = ['age'], values = ["salary"], period = period)
pivot_table = survey_scenario.compute_pivot_table(columns = ['age'], values = ["salary"], period = period, simulation = "baseline")

assert pivot_table.values.round() == 13570.


def test_compute_quantile():
survey_scenario = create_randomly_initialized_survey_scenario()
period = "2017-01"
quintiles = survey_scenario.compute_quantiles(variable = "salary", nquantiles = 5, period = period, weighted = False)
quintiles = survey_scenario.compute_quantiles(variable = "salary", nquantiles = 5, period = period, weighted = False, simulation = "baseline")
return quintiles


Expand Down

0 comments on commit aa7d451

Please sign in to comment.