mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-20 00:41:05 +03:00
Minor tweaks
This commit is contained in:
parent
0beaf6eb31
commit
a805ac0acc
@ -172,7 +172,7 @@ class CnafSimulatorInput():
|
||||
self.revenu_pris_en_compte = revenu_pris_en_compte
|
||||
|
||||
def __str__(self):
|
||||
return "-> Code postal : {}\n-> Logement : {}\n-> Loyer : {} €\n-> Seul of couple : {}\n-> Enfants:\n{}\n-> Revenus pris en compte : {} €".format(
|
||||
return "-> Code postal : {}\n-> Logement : {}\n-> Loyer : {} €\n-> Seul of couple : {}\n-> Enfants :\n{}\n-> Revenus pris en compte : {} €".format(
|
||||
self.zone.name,
|
||||
self.logement,
|
||||
self.loyer,
|
||||
|
@ -96,15 +96,16 @@ def run_catala_by_converting_cnaf_input(sample_input: CnafSimulatorInput) -> flo
|
||||
return round(housing_benefits_gross*0.995) # We take the CRDS
|
||||
|
||||
|
||||
print("🏡 Description du ménage")
|
||||
print(sample_input)
|
||||
housing_benefits_catala = run_catala_by_converting_cnaf_input(sample_input)
|
||||
print("Aides au logement (Catala): {} €".format(housing_benefits_catala))
|
||||
print("💰 Aides au logement (Catala): {} €".format(housing_benefits_catala))
|
||||
housing_benefits_cnaf = run_simulator(sample_input)
|
||||
print("Aides au logement (CNAF) : {} €".format(housing_benefits_cnaf))
|
||||
print("💰 Aides au logement (CNAF) : {} €".format(housing_benefits_cnaf))
|
||||
delta = abs(housing_benefits_catala - housing_benefits_cnaf)
|
||||
if delta == 0:
|
||||
print("No difference!")
|
||||
print("✅ Pas de difference")
|
||||
exit(0)
|
||||
else:
|
||||
print("There is a difference!")
|
||||
print("❌ Différence")
|
||||
exit(-1)
|
||||
|
Loading…
Reference in New Issue
Block a user