-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Consolidate and update pytest options in pyproject.toml (#1773)
* Remove .coveragerc and consolidate pytest options to pyproject.toml. * Apply 'configuring pytest' recommendations for pytest from Scikit-HEP (c.f. https://scikit-hep.org/developer/pytest#configuring-pytest ). - '-ra' includes a report after pytest runs with a summary on all tests except those that passed. From 'pytest --help': > -r chars: show extra test summary info as specified by chars: (f)ailed, > (E)rror, (s)kipped, (x)failed, (X)passed, (p)assed, (P)assed with output, > (a)ll except passed (p/P), or (A)ll. (w)arnings are enabled by default > (see --disable-warnings), 'N' can be used to reset the list. (default: 'fE'). - '--showlocal' prints locals in tracebacks. - '--strict-markers' will complain if you use an unspecified fixture. - '--strict-config' will raise an error if there is a mistake in the pytest config. - 'log_cli_level = "info"' reports INFO and above log messages on a failure. - 'filterwarnings = ["error"]' sets all warnings to be errors and allows for some warnings to be ignored with -W warn control syntax. (c.f. https://docs.python.org/dev/using/cmdline.html#cmdoption-W ) * Remove `tests/__init__.py` as no reason to make the tests directory importable. * Remove '-r sx' from pytest calls in CI jobs as pyproject.toml now applies '-ra'. * Use 'with pytest.warns' to assert expected warnings in tests. (c.f. https://docs.pytest.org/en/7.0.x/how-to/capture-warnings.html#warns ) * Override error on filterwarnings for the 'minimum supported dependencies' GHA workflow as it is testing for the oldest releases that work with the latest API, not the oldest releases that are warning free. * Remove unused nbQA options for black from pyproject.toml. - Amends PR #1598
- Loading branch information
1 parent
b091985
commit c2c2891
Showing
11 changed files
with
92 additions
and
87 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Empty file.
This file contains 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
This file contains 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
This file contains 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