We previously used Deno, as it is embedded in Quarto (anyone can run the script); however, Deno has given us all sorts of troubles (changing the functions' names, changing imports, ...).
Quarto also supports Python scripts, although the interpreter must be installed externally (but that should not be a problem, everyone has Python, and CI/CD workflows can easily setup a Python interpreter).
This commit:
Removes the Deno test script run_tests.ts.
Replaces it with a new Python script run_tests.py.
Automatically detects tests to perform instead of requiring to list them in the test script (see the all_tests variable).
Adds information to the "short" reporting (single-line result on the command line), by indicating whether the return code is OK, the actual output equals the expected one, and the actual error equals the expected one. These details were previously only present in the Markdown summary.
Adds an argument parser to support for various arguments in the future, instead of only considering arguments to be the tests names. We can still specify the tests to run as arguments, but more options can be made available.
Update the test workflow (GitHub CI/CD) to setup Python and run the Python test script instead of the Deno one.
We previously used Deno, as it is embedded in Quarto (anyone can run the script); however, Deno has given us all sorts of troubles (changing the functions' names, changing imports, ...).
Quarto also supports Python scripts, although the interpreter must be installed externally (but that should not be a problem, everyone has Python, and CI/CD workflows can easily setup a Python interpreter).
This commit:
run_tests.ts
.run_tests.py
.all_tests
variable).Solves #21