Software tests

Running the test suite

The PennyLane test suite requires the Python pytest package, as well as pytest-cov for test coverage and pytest-mock for mocking; these can be installed via pip:

pip install pytest pytest-cov pytest-mock

To ensure that PennyLane is working correctly, the test suite can be run by navigating to the source code folder and running

make test

while the test coverage can be checked by running

make coverage

The output of the above command will show the coverage percentage of each file, as well as the line numbers of any lines missing test coverage.