test: refine pytest skip framework, improve confest.py#1486
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1486 +/- ##
==============================================
- Coverage 72.493% 29.941% -42.552%
==============================================
Files 250 250
Lines 54002 52532 -1470
==============================================
- Hits 39148 15729 -23419
- Misses 14854 36803 +21949
|
* add "pytest_report_header" to show packages installed (or not) * remove "requires_exes", adjust "requires_exe" * add "has_exe", "has_pkg", and "requires_pkg" functions * use functions for tests, with a combination of installed packages * add "run_cmd" and "run_py_script" functions * example notebooks and scripts can skip if they use missing optional dep * update DEVELOPER.md with new changes
02bcc1a to
39b0138
Compare
wpbonelli
approved these changes
Aug 8, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR builds on the new pytest framework with a few changes:
pytest_report_headerto show packages installed (or not). For example, at the top of every pytest run shows something like this:requires_exes, adjustrequires_exe, which takes multiple (e.g.)@requires_exe("mf6", "gridgen")has_exe,has_pkg, andrequires_pkgfunctionsrun_cmdandrun_py_scriptfunctionsDEVELOPER.mdwith new changesgit rev-parse --abbrev-ref HEADto get branch name, etc.