Testing with pytest and catch2
pytest
The code testing can be easily performed by an assert statement. And the pytest can assist us in generating a report.For example, in test file, a testing case is executed by the function containing assert statement.
def test_return():
assert a.function() == 1.0
To execute the testing code and generate a report, we can utilize the following command
pytest --cov=./ --cov-report=xml test/*.py