openfisca / openfisca-tunisia

Tunisian tax and benefit system for OpenFisca
http://www.openfisca.tn
15 stars 7 forks source link

Use pytest instead of nose library for tests #105

Closed benjello closed 5 years ago

benjello commented 5 years ago

@sandcha you created this branch that was never merged. Why ? I open the PR to have this discussion.

sandcha commented 5 years ago

J'ai mis ça en attente parce que ce n'était pas sec du côté d'openfisca-core. Ce devrait être ok maintenant.

sandcha commented 5 years ago

Je confirme ; c'était en stand by en raison de cette erreur python3.7/site-packages/openfisca_core/tools/test_runner.py:177: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. tests = yaml.load(yaml_file)

Rebase en cours.

benjello commented 5 years ago

@sandcha could you approve yourself ? :-)

sandcha commented 5 years ago

@benjello Ce coup-ci, je suis intéressée par une review parce qu'il restait des modifications à apporter aux tests pour remplacer les yield et les xfail qui en découlaient :

collected 5 items                                                                                            

tests/core_tests.py x                                                                                  [ 20%]
tests/test_basics.py x                                                                                 [ 40%]
tests/test_legislations.py x                                                                           [ 60%]
tests/test_prestations_familiales.py .                                                                 [ 80%]
tests/test_simple.py .                                                                                 [100%]

============================== 2 passed, 3 xfailed, 11 warnings in 2.92 seconds ==============================

On peut, par exemple, voir l'effet du dernier commit avec pytest -v.

benjello commented 5 years ago

@sandcha : petite correction apportée. Si cela te va approuve et merge stp. Merci !