-
Notifications
You must be signed in to change notification settings - Fork 238
Running Tests and Continuous Integration
Developers should run the unit
and component
tests at a minimum before creating a Pull Request in order to avoid test failures on the PR. A PR must pass all tests (including integration
tests) before it will be merged, thus it is best to identify these early. It is also a good idea to run the integration
tests unless you are certain your changes will not affect the examples - these take a long time to run however, so be judicious when running them. The IDAES tests can be run from a Python command line using the following:
>>> pytest
Pytest can be used to run tests in a specific path or file using:
>>> pytest PATH
Pytest can also be directed to run tests with specific marks:
>>> pytest -m unit # Only run tests with the "unit" mark
>>> pytest -m "not integration" # Run all tests in PATH that do not have the "integration" mark
IDAES Also used automated testing via GitHub Actions to run the test suite on all Pull Requests to the main repository, as well as to run regularly scheduled tests of the current code.
- 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