Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
paul committed May 23, 2023
1 parent bc2aadc commit 53a564a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions tests/test_inversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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]
Expand Down

0 comments on commit 53a564a

Please sign in to comment.