Awlsim development notes

Unit tests

The unit test suite can be run with the invocation of the command ./tests/ This will run all unit tests and show the results. Please see ./tests/ --help for more options.

Code coverage tracing

To run a code statement coverage trace during unit testing the option ./tests/ --coverage is available. The results will be stored in ./code-coverage-report/. It is desired to have a reasonable code coverage of the unit tests. All main code paths should be covered.

Special annotations in the source code

In order to support both compiling the Awlsim core with Cython and running the same code in a plain Python interpreter without compilation, a method to patch the files is required. The scrips patch each .py source file and create a .pyx file before starting Cython compilation. The Cython patching mechanism rewrites all imports to import the compiled Cython modules instead of the plain Python modules. In addition to that some special comments are provided as hint to the Cython patcher:

To disable code coverage tracing an additional special comment is provided: