Mon Jun 26 16:03:50 2023 UTC ()
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.


(adam)
diff -r1.115 -r1.116 pkgsrc/devel/py-test/Makefile
diff -r1.101 -r1.102 pkgsrc/devel/py-test/distinfo

cvs diff -r1.115 -r1.116 pkgsrc/devel/py-test/Makefile (expand / switch to unified diff)

--- pkgsrc/devel/py-test/Makefile 2023/06/12 09:29:53 1.115
+++ pkgsrc/devel/py-test/Makefile 2023/06/26 16:03:50 1.116
@@ -1,28 +1,28 @@ @@ -1,28 +1,28 @@
1# $NetBSD: Makefile,v 1.115 2023/06/12 09:29:53 adam Exp $ 1# $NetBSD: Makefile,v 1.116 2023/06/26 16:03:50 adam Exp $
2 2
3DISTNAME= pytest-7.3.2 3DISTNAME= pytest-7.4.0
4PKGNAME= ${PYPKGPREFIX}-${DISTNAME:S/py//} 4PKGNAME= ${PYPKGPREFIX}-${DISTNAME:S/py//}
5CATEGORIES= devel python 5CATEGORIES= devel python
6MASTER_SITES= ${MASTER_SITE_PYPI:=p/pytest/} 6MASTER_SITES= ${MASTER_SITE_PYPI:=p/pytest/}
7 7
8MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= https://pytest.org/ 9HOMEPAGE= https://pytest.org/
10COMMENT= Python testing tool 10COMMENT= Python testing tool
11LICENSE= mit 11LICENSE= mit
12 12
13TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools-[0-9]*:../../devel/py-setuptools 13TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools-[0-9]*:../../devel/py-setuptools
14TOOL_DEPENDS+= ${PYPKGPREFIX}-wheel-[0-9]*:../../devel/py-wheel 
15TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools_scm-[0-9]*:../../devel/py-setuptools_scm 14TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools_scm-[0-9]*:../../devel/py-setuptools_scm
 15TOOL_DEPENDS+= ${PYPKGPREFIX}-wheel-[0-9]*:../../devel/py-wheel
16DEPENDS+= ${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat 16DEPENDS+= ${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat
17DEPENDS+= ${PYPKGPREFIX}-iniconfig-[0-9]*:../../devel/py-iniconfig 17DEPENDS+= ${PYPKGPREFIX}-iniconfig-[0-9]*:../../devel/py-iniconfig
18DEPENDS+= ${PYPKGPREFIX}-packaging-[0-9]*:../../devel/py-packaging 18DEPENDS+= ${PYPKGPREFIX}-packaging-[0-9]*:../../devel/py-packaging
19DEPENDS+= ${PYPKGPREFIX}-pluggy>=0.12:../../devel/py-pluggy 19DEPENDS+= ${PYPKGPREFIX}-pluggy>=0.12:../../devel/py-pluggy
20TEST_DEPENDS+= ${PYPKGPREFIX}-argcomplete-[0-9]*:../../devel/py-argcomplete 20TEST_DEPENDS+= ${PYPKGPREFIX}-argcomplete-[0-9]*:../../devel/py-argcomplete
21TEST_DEPENDS+= ${PYPKGPREFIX}-attrs>=19.2.0:../../devel/py-attrs 21TEST_DEPENDS+= ${PYPKGPREFIX}-attrs>=19.2.0:../../devel/py-attrs
22TEST_DEPENDS+= ${PYPKGPREFIX}-hypothesis>=3.56:../../devel/py-hypothesis 22TEST_DEPENDS+= ${PYPKGPREFIX}-hypothesis>=3.56:../../devel/py-hypothesis
23TEST_DEPENDS+= ${PYPKGPREFIX}-mock-[0-9]*:../../devel/py-mock 23TEST_DEPENDS+= ${PYPKGPREFIX}-mock-[0-9]*:../../devel/py-mock
24TEST_DEPENDS+= ${PYPKGPREFIX}-nose-[0-9]*:../../devel/py-nose 24TEST_DEPENDS+= ${PYPKGPREFIX}-nose-[0-9]*:../../devel/py-nose
25TEST_DEPENDS+= ${PYPKGPREFIX}-pygments>=2.7.2:../../textproc/py-pygments 25TEST_DEPENDS+= ${PYPKGPREFIX}-pygments>=2.7.2:../../textproc/py-pygments
26TEST_DEPENDS+= ${PYPKGPREFIX}-requests-[0-9]*:../../devel/py-requests 26TEST_DEPENDS+= ${PYPKGPREFIX}-requests-[0-9]*:../../devel/py-requests
27TEST_DEPENDS+= ${PYPKGPREFIX}-xmlschema-[0-9]*:../../textproc/py-xmlschema 27TEST_DEPENDS+= ${PYPKGPREFIX}-xmlschema-[0-9]*:../../textproc/py-xmlschema
28 28

cvs diff -r1.101 -r1.102 pkgsrc/devel/py-test/distinfo (expand / switch to unified diff)

--- pkgsrc/devel/py-test/distinfo 2023/06/12 09:29:53 1.101
+++ pkgsrc/devel/py-test/distinfo 2023/06/26 16:03:50 1.102
@@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
1$NetBSD: distinfo,v 1.101 2023/06/12 09:29:53 adam Exp $ 1$NetBSD: distinfo,v 1.102 2023/06/26 16:03:50 adam Exp $
2 2
3BLAKE2s (pytest-7.3.2.tar.gz) = d8437420d40e863891a7abda2b45105c95569c2eb985811ec72b07559a132cdc 3BLAKE2s (pytest-7.4.0.tar.gz) = 7ab1ad63fd75e5b6a620ed32fc67ac49645b67c3a68af71224e3ffef672b5a96
4SHA512 (pytest-7.3.2.tar.gz) = 910de83f6ce47e7b1b25947050cf79e055ab04fd0c3dc3276546415684c20c8977883f16dfb913de3f339bc6284330f8a57d202c73f92b92545e45acb353b264 4SHA512 (pytest-7.4.0.tar.gz) = 48caca22c77e03cb3bca04d2f11695c48868433e6966b6f652f414b3b4405cb9dfba1ebdfd66060ba6add45609ec27b2eddd81d3739ef8e84a51b9da3c6f6099
5Size (pytest-7.3.2.tar.gz) = 1338457 bytes 5Size (pytest-7.4.0.tar.gz) = 1349733 bytes