From 598d216123778fb3c13d779be41a5370c21d3c40 Mon Sep 17 00:00:00 2001 From: Mahdi Ben Jelloul Date: Thu, 14 Nov 2024 13:13:48 +0100 Subject: [PATCH] Clean tests --- Makefile | 10 ++-- openfisca_tunisia_pension/tests/__init__.py | 0 .../tests/formulas/pension_rsna.yaml | 50 ------------------- .../formulas/salaire_reference_rsna.yaml | 49 ------------------ pyproject.toml | 3 +- 5 files changed, 9 insertions(+), 103 deletions(-) delete mode 100644 openfisca_tunisia_pension/tests/__init__.py delete mode 100644 openfisca_tunisia_pension/tests/formulas/pension_rsna.yaml delete mode 100644 openfisca_tunisia_pension/tests/formulas/salaire_reference_rsna.yaml diff --git a/Makefile b/Makefile index 333cd28..2a311d5 100644 --- a/Makefile +++ b/Makefile @@ -39,15 +39,19 @@ check-style: @# `make` needs `$$` to output `$`. Ref: http://stackoverflow.com/questions/2382764. flake8 `git ls-files | grep "\.py$$"` +check-path-length: + @# Verify that there is no path exceeding Windows limit + python openfisca_tunisia_pension/scripts/check_path_length.py + check-yaml: @# check yaml style .github/lint-changed-yaml-tests.sh check-all-yaml: @# check yaml style - yamllint . + yamllint openfisca_tunisia_pension/parameters + yamllint tests test: clean check-syntax-errors check-style - @# Launch tests from openfisca_tunisia_pension/tests directory (and not .) because TaxBenefitSystem must be initialized @# before parsing source files containing formulas. - openfisca test --country-package openfisca_tunisia_pension openfisca_tunisia_pension/tests + openfisca test --country-package openfisca_tunisia_pension tests diff --git a/openfisca_tunisia_pension/tests/__init__.py b/openfisca_tunisia_pension/tests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/openfisca_tunisia_pension/tests/formulas/pension_rsna.yaml b/openfisca_tunisia_pension/tests/formulas/pension_rsna.yaml deleted file mode 100644 index 543aaf5..0000000 --- a/openfisca_tunisia_pension/tests/formulas/pension_rsna.yaml +++ /dev/null @@ -1,50 +0,0 @@ -- 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 diff --git a/openfisca_tunisia_pension/tests/formulas/salaire_reference_rsna.yaml b/openfisca_tunisia_pension/tests/formulas/salaire_reference_rsna.yaml deleted file mode 100644 index a763fd9..0000000 --- a/openfisca_tunisia_pension/tests/formulas/salaire_reference_rsna.yaml +++ /dev/null @@ -1,49 +0,0 @@ -- 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 diff --git a/pyproject.toml b/pyproject.toml index 641d611..811b049 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,8 @@ requires-python = ">= 3.9" dependencies = [ 'bottleneck >=1.3.2,<=2.0.0', 'numpy >=1.24.3, <2', - 'openfisca-core[web-api] >=43, <44', + # 'openfisca-core[web-api] >=43, <44', + 'openfisca-core[web-api] ==41.5.3', 'scipy >= 0.12', ]