-
Notifications
You must be signed in to change notification settings - Fork 234
howto pytest coverage
Ludovico Bianchi edited this page Jul 13, 2022
·
1 revision
- You're working on a test file named
test_multiperiod.py
Run the following command:
pytest --cov --cov-report html:.cov-report/ --cov-report term -k test_multiperiod
A coverage report will be generated:
- In text format, displayed directly in the terminal
- In HTML format (interactive): open the
.cov-report/index.html
file with a web browser
- The Reporting section of the documentation for the pytest-cov plugin
- Set up pre-commit
- Run pytest with coverage report
- Run Pylint locally
- Update the Pyomo version
- Install Pyomo from a local Git clone
- Set up GitHub authentication with GCM
- Handle warnings in pytest