openfisca / openfisca-core

OpenFisca core engine. See other repositories for countries-specific code & data.
https://openfisca.org
GNU Affero General Public License v3.0
170 stars 75 forks source link

`verbose` option of `openfisca test` fails #1293

Closed benjello closed 3 days ago

benjello commented 1 week ago

Hi there!

I really enjoy OpenFisca, but I recently encountered an issue.

Here is what I did:

I ran with openfisca-core >= 43

openfisca test -c openfisca_france tests/fiches_de_paie/ingenieur_ssii_2013-08.yaml -v

Here is what I expected to happen:

I expected to obtain a verbose test or at least a passing test

Here is what actually happened:

I got

FAILED tests/fiches_de_paie/ingenieur_ssii_2013-08.yaml:: - TypeError: '>' not supported between instances of 'int' and 'NoneType'

This error is not present with core 41.5.3

I also added an error int the test file and a depth option to investigate more

openfisca test -c openfisca_france tests/fiches_de_paie/ingenieur_ssii_2013-08.yaml -v -d 4

The computation log was printed in core 41.5.3 but o output in >=43

cc @bonjourmauko

sandcha commented 4 days ago

A first analysis shows that we are missing tests of the trace option. 😬 And to write these tests we need to find the right syntax; our test command is built on top of pytest and our current tests do not show examples including this pytest syntax change: Node Construction changed to Node.from_parent (which is a little bit more complex than it looks)