Testing

Documentation /Testing

Tests can be run either in the terminal or in a Python/Jupyter file. It’s recommended to use the terminal with the cachai-test command. To see how to use the command and the available options, simply run the command in your terminal with the option -h or --help as follows:

$ cachai-test -h
usage: cachai-test [OPTIONS] [TESTS...]

Run the tests from CACHAI

positional arguments:
tests          Names of the tests to run (e.g. 'charts', 'utilities'). If
                not specified, all tests are run.

options:
-h, --help     show this help message and exit
-v, --verbose  Mostrar output detallado (equivalente a pytest -v)
-l, --list     List all available tests without running them

Contents

get_available_tests()

Retrieve the list of available test modules.

run_tests(…)

Run cachai's test suite using pytest.