Subject: CVS commit: pkgsrc/devel/py-test
From: Adam Ciarcinski
Date: 2023-06-26 18:03:50
Message id: 20230626160350.99197FA89@cvs.NetBSD.org

Log Message:
py-test: updated to 7.4.0

pytest 7.4.0 (2023-06-23)
Features
* Added ExceptionInfo.from_exception(), a simpler way to create an ExceptionInfo \ 
from an exception. This can replace ExceptionInfo.from_exc_info() for most uses.
Improvements
* Update test log report annotation to named tuple and fixed inconsistency in \ 
docs for pytest_report_teststatus hook.

* When an exception traceback to be displayed is completely filtered out (by \ 
mechanisms such as __tracebackhide__, internal frames, and similar), now only \ 
the exception string and the following message are shown:

“All traceback entries are hidden. Pass --full-trace to see hidden and \ 
internal frames.”.

Previously, the last frame of the traceback was shown, even though it was hidden.

* Improved verbose output (-vv) of skip and xfail reasons by performing text \ 
wrapping while leaving a clear margin for progress output.

Added TerminalReporter.wrap_write() as a helper for that.

* Added handling of %f directive to print microseconds in log format options, \ 
such as log-date-format.

* Added the underlying exception to the cache provider’s path creation and \ 
write warning messages.

* Added warning when testpaths is set, but paths are not found by glob. In this \ 
case, pytest will fall back to searching from the current directory.

* When --confcutdir is not specified, and there is no config file present, the \ 
conftest cutoff directory (--confcutdir) is now set to the rootdir. Previously \ 
in such cases, conftest.py files would be probed all the way to the root \ 
directory of the filesystem. If you are badly affected by this change, consider \ 
adding an empty config file to your desired cutoff directory, or explicitly set \ 
--confcutdir.

* The norecursedirs check is now performed in a pytest_ignore_collect \ 
implementation, so plugins can affect it.

If after updating to this version you see that your norecursedirs setting is not \ 
being respected, it means that a conftest or a plugin you use has a bad \ 
pytest_ignore_collect implementation. Most likely, your hook returns False for \ 
paths it does not want to ignore, which ends the processing and doesn’t allow \ 
other plugins, including pytest itself, to ignore the path. The fix is to return \ 
None instead of False for paths your hook doesn’t want to ignore.

* caplog.set_level() and caplog.at_level() will temporarily enable the requested \ 
level if level was disabled globally via logging.disable(LEVEL).
Bug Fixes
* Terminal Reporting: Fixed bug when running in --tb=line mode where \ 
pytest.fail(pytrace=False) tests report None.
* Fixed the --last-failed whole-file skipping functionality (“skipped N \ 
files”) for non-python test files.
* Fixed a regression in pytest 7.3.2 which caused to testpaths to be considered \ 
for loading initial conftests, even when it was not utilized (e.g. when explicit \ 
paths were given on the command line). Now the testpaths are only considered \ 
when they are in use.
* Fixed traceback entries hidden with __tracebackhide__ = True still being shown \ 
for chained exceptions (parts after “… the above exception …” message).
* Fix writing non-encodable text to log file when using --debug.
Improved Documentation
* Improved documentation for caplog.set_level().
Trivial/Internal Changes
* Enhanced the CLI flag for -c to now include --config-file to make it clear \ 
that this flag applies to the usage of a custom config file.

Files:
RevisionActionfile
1.116modifypkgsrc/devel/py-test/Makefile
1.102modifypkgsrc/devel/py-test/distinfo