Testing Arcalibre
Arcalibre is predominantly written in Python, supported by additional code in C, C++, Rust, and JavaScript. Each of these languages is tested in a different manner, but most tests are written using the pytest framework.
Python Tests
Tests for the main Arcalibre Python package (currently called calibre for historical reasons) and associated packages in the same Python project such as tinycss and polyglot are contained in the tests/ folder of the repository. The just test recipe invokes pytest on this folder, such unit and integration tests are collected from the tests/ folder.
In particular, a test case is collected if:
- It is implemented in a Python module named
test_*.pylocated somewhere in thetests/folder, and - It is implemented as a function whose name begins with
test_or a method whose name begins withtest_contained in a class whose name begins withTest.
Tests for standalone wheels that are not part of the main Arcalibre Python project, but that are used by Arcalibre, are defined in a similar fashion, but located adjacent to each wheel's src/ folder.
C/C++ Tests
TODO
JavaScript, TypeScript, and RapydScript-NG Tests
TODO
Rust Tests
Rust code can be tested in two ways:
- Via its Python interface, as ordinary Python code.
- As standard Rust unit tests.
TODO: expand