From 53a564ae122c3bdc26ba44c339f71962f2b36691 Mon Sep 17 00:00:00 2001 From: paul Date: Tue, 23 May 2023 20:07:21 +0200 Subject: [PATCH] typos --- tests/test_inversion.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/test_inversion.py b/tests/test_inversion.py index 7c932ad0..8cc310d9 100644 --- a/tests/test_inversion.py +++ b/tests/test_inversion.py @@ -25,7 +25,9 @@ ### Data creation -cd = os.path.dirname(__file__) +# cd = os.path.dirname(__file__) + +cd = "/home/paul/Documents/projets/openfisca-france-data/tests/" path = os.path.join(cd, "inversion", "remplacement_2021.yaml") year = re.match(".*([0-9]{4}).yaml", path).group(1) @@ -34,8 +36,8 @@ ### Inverse incomes from net to gross : the tested functions -create_taux_csg_remplacement(individus, period(year), tax_benefit_system) -create_revenus_remplacement_bruts(individus, period(year), tax_benefit_system) +create_taux_csg_remplacement(individus, p(year), tax_benefit_system) +create_revenus_remplacement_bruts(individus, p(year), tax_benefit_system) ### Test against chomage_brut_test @@ -67,7 +69,6 @@ #cd = os.path.dirname(__file__) #cd = "/home/paul/Documents/projets/openfisca-france-data/tests/" -cd = "C:/Users/p.dutronc/Documents/research/projets/openfisca-france-data/tests/" ##### ##### ##### ##### ##### ##### ##### ##### Pre 2019 reform : inversion TAXIPP @@ -85,7 +86,9 @@ ### Test against salaire_de_base_test -fails = [i for i in individus.index if abs(individus.loc[i]["salaire_de_base"]-individus.loc[i]["salaire_de_base_test"])>=margin] +fails = [i for i in individus.index if + (abs(individus.loc[i]["salaire_de_base"]-individus.loc[i]["salaire_de_base_test"])>=margin) + or (abs(individus.loc[i]["traitement_indiciaire_brut"]-individus.loc[i]["traitement_brut_test"])>=margin)] message = "".join( ["For test {}, found {} for salaire_de_base, tested against {}.\n".format(i,individus.loc[i]["salaire_de_base"],individus.loc[i]["salaire_de_base_test"]) for i in fails]