Draft: Running tests natively, using modules
This relies on the latest Catala version, including https://github.com/CatalaLang/catala/pull/502
It's intended as a demo of how we expect to run tests using modules. The
manually-coded Makefile rules and the catala module
are intended to be
replaced by handling from clerk
.
Current limitations:
since Catala doesn't support cross-module disambiguation yet, all references in the tests had to be fully qualified (e.g.Impot_revenu.Enum.Case
)module usage is fully on the command-line, not in the language- since the tests code refer to the
IR
module, they can't be text-included in the main code (for inclusive literate output): the name would be unresolved.
I am not sure how best to avoid this last limitation ; one way would be to
include all the test cases in the master file (without IR.
qualification) and then have a test file that only has the catala-test-inline
stanzas ; but that seems less convenient and error-prone.
Or maybe a clever module naming/aliasing/opening system could help.
Edited by Louis Gesbert