Skip to content

Commit

Permalink
Move away tests from package
Browse files Browse the repository at this point in the history
  • Loading branch information
benjello committed Nov 14, 2024
1 parent a9367ab commit c197c07
Show file tree
Hide file tree
Showing 8 changed files with 110 additions and 1 deletion.
File renamed without changes.
10 changes: 10 additions & 0 deletions .github/tests/base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from openfisca_tunisia_pension import TunisiaPensionTaxBenefitSystem


__all__ = [
'tax_benefit_system',
'TunisiaPensionTaxBenefitSystem',
]


tax_benefit_system = TunisiaPensionTaxBenefitSystem()
50 changes: 50 additions & 0 deletions .github/tests/formulas/pension_rsna.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
- name: "Individu salarié 12000 DT par an durant toute sa carrière"
period: 2011
absolute_error_margin: 0.5
input:
age: 60
trimestres_valides: 50
salaire:
1975: 12000
1976: 12000
1977: 12000
1978: 12000
1979: 12000
1980: 12000
1981: 12000
1982: 12000
1983: 12000
1984: 12000
1985: 12000
1986: 12000
1987: 12000
1988: 12000
1989: 12000
1990: 12000
1991: 12000
1992: 12000
1993: 12000
1994: 12000
1995: 12000
1996: 12000
1997: 12000
1998: 12000
1999: 12000
2000: 12000
2001: 12000
2002: 12000
2003: 12000
2004: 12000
2005: 12000
2006: 12000
2007: 12000
2008: 12000
2009: 12000
2010: 12000
2011: 12000
2012: 12000
2013: 12000
2014: 12000
output:
salaire_reference_rsna: 12000
pension_rsna: 5400
49 changes: 49 additions & 0 deletions .github/tests/formulas/salaire_reference_rsna.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
- name: "Individu salarié 12000 DT par an toute sa carrière"
period: 2011
absolute_error_margin: 0.5
input:
age: 60
trimestres_valides: 50
salaire:
1975: 12000
1976: 12000
1977: 12000
1978: 12000
1979: 12000
1980: 12000
1981: 12000
1982: 12000
1983: 12000
1984: 12000
1985: 12000
1986: 12000
1987: 12000
1988: 12000
1989: 12000
1990: 12000
1991: 12000
1992: 12000
1993: 12000
1994: 12000
1995: 12000
1996: 12000
1997: 12000
1998: 12000
1999: 12000
2000: 12000
2001: 12000
2002: 12000
2003: 12000
2004: 12000
2005: 12000
2006: 12000
2007: 12000
2008: 12000
2009: 12000
2010: 12000
2011: 12000
2012: 12000
2013: 12000
2014: 12000
output:
salaire_reference_rsna: 12000
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(self):
super(TunisiaPensionTaxBenefitSystem, self).__init__(entities.entities)

# We add to our tax and benefit system all the variables
self.add_variables_from_directory(os.path.join(COUNTRY_DIR, 'model'))
self.add_variables_from_directory(os.path.join(COUNTRY_DIR, 'variables'))

# We add to our tax and benefit system all the legislation parameters defined in the parameters files
parameters_path = os.path.join(COUNTRY_DIR, 'parameters')
Expand Down
Empty file.
File renamed without changes.
File renamed without changes.

0 comments on commit c197c07

Please sign in to comment.