From ec619e55e892f9fe2ab46b1ca5c8e202c67acc5a Mon Sep 17 00:00:00 2001 From: Mahdi Ben Jelloul Date: Sat, 23 Jan 2021 10:38:34 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: sandcha --- openfisca_france/reforms/plf2016.py | 1 - tests/reforms/test_landais_piketty_saez.py | 1 - tests/test_basics.py | 5 +++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/openfisca_france/reforms/plf2016.py b/openfisca_france/reforms/plf2016.py index 898a200282..a534de2c52 100644 --- a/openfisca_france/reforms/plf2016.py +++ b/openfisca_france/reforms/plf2016.py @@ -1,4 +1,3 @@ - import os from ..model.base import * diff --git a/tests/reforms/test_landais_piketty_saez.py b/tests/reforms/test_landais_piketty_saez.py index cff84d7f99..c2c69bd43f 100644 --- a/tests/reforms/test_landais_piketty_saez.py +++ b/tests/reforms/test_landais_piketty_saez.py @@ -1,4 +1,3 @@ - import datetime from openfisca_core import periods diff --git a/tests/test_basics.py b/tests/test_basics.py index d7834c5cdb..be56e5777f 100644 --- a/tests/test_basics.py +++ b/tests/test_basics.py @@ -41,7 +41,7 @@ def test_basics(scenario_arguments): def test_init_single_entity_parallel_axes(): year = 2019 count = 3 - indexes = [0, 1] + indexes = [0, 1, 2] salaire_de_base_axes = [ dict( count = count, @@ -59,9 +59,10 @@ def test_init_single_entity_parallel_axes(): scenario_kwargs = dict( parent1 = dict(age = 40), parent2 = dict(age = 40), + enfants = [dict(age = 20)], axes = axes, period = year ) simulation = init_single_entity(tax_benefit_system.new_scenario(), **scenario_kwargs).new_simulation() - assert simulation.calculate_add('salaire_de_base', year) == pytest.approx([0, 0, 7500, 7500, 15000, 15000]) + assert simulation.calculate_add('salaire_de_base', year) == pytest.approx([0, 0, 0, 7500, 7500, 7500, 15000, 15000, 15000])