Mon Jan 7 08:38:01 2019 UTC ()
py-test: updated to 4.1.0

pytest 4.1.0:
Removals
* pytest.mark.parametrize: in previous versions, errors raised by id functions were suppressed and changed into warnings. Now the exceptions are propagated, along with a pytest message informing the node, parameter value and index where the exception occurred.
* Remove legacy internal warnings system: config.warn, Node.warn. The pytest_logwarning now issues a warning when implemented.
See our docs on information on how to update your code.
* Removed support for yield tests - they are fundamentally broken because they don窶冲 support fixtures properly since collection and test execution were separated.
See our docs on information on how to update your code.
* Removed support for applying marks directly to values in @pytest.mark.parametrize. Use pytest.param instead.
See our docs on information on how to update your code.
* Removed Metafunc.addcall. This was the predecessor mechanism to @pytest.mark.parametrize.
See our docs on information on how to update your code.
* Removed support for passing strings to pytest.main. Now, always pass a list of strings instead.
See our docs on information on how to update your code.
* [pytest] section in setup.cfg files is not longer supported, use [tool:pytest] instead. setup.cfg files are meant for use with distutils, and a section named pytest has notoriously been a source of conflicts and bugs.
Note that for pytest.ini and tox.ini files the section remains [pytest].
* Removed the deprecated compat properties for node.Class/Function/Module - use pytest.Class/Function/Module now.
See our docs on information on how to update your code.
* Removed the implementation of the pytest_namespace hook.
See our docs on information on how to update your code.
* Removed request.cached_setup. This was the predecessor mechanism to modern fixtures.
See our docs on information on how to update your code.
* Removed the deprecated PyCollector.makeitem method. This method was made public by mistake a long time ago.
* Removed support to define fixtures using the pytest_funcarg__ prefix. Use the @pytest.fixture decorator instead.
See our docs on information on how to update your code.
* Calling fixtures directly is now always an error instead of a warning.
See our docs on information on how to update your code.
* Remove Node.get_marker(name) the return value was not usable for more than a existence check.
Use Node.get_closest_marker(name) as a replacement.
* The deprecated record_xml_property fixture has been removed, use the more generic record_property instead.
See our docs for more information.
* An error is now raised if the pytest_plugins variable is defined in a non-top-level conftest.py file (i.e., not residing in the rootdir).
See our docs for more information.
* Remove testfunction.markername attributes - use Node.iter_markers(name=None) to iterate them.

Deprecations
* Deprecated the pytest.config global.
See https://docs.pytest.org/en/latest/deprecations.html#pytest-config-global for rationale.
* Passing the message parameter of pytest.raises now issues a DeprecationWarning.
It is a common mistake to think this parameter will match the exception message, while in fact it only serves to provide a custom message in case the pytest.raises check fails. To avoid this mistake and because it is believed to be little used, pytest is deprecating it without providing an alternative for the moment.
If you have concerns about this, please comment on issue 3974.
* Deprecated raises(..., 'code(as_a_string)') and warns(..., 'code(as_a_string)').
See https://docs.pytest.org/en/latest/deprecations.html#raises-warns-exec for rationale and examples.

Features
* A warning is now issued when assertions are made for None.
This is a common source of confusion among new users, which write:
assert mocked_object.assert_called_with(3, 4, 5, key="value")
When they should write:
mocked_object.assert_called_with(3, 4, 5, key="value")
Because the assert_called_with method of mock objects already executes an assertion.
This warning will not be issued when None is explicitly checked. An assertion like:
assert variable is None
will not issue the warning.
* Richer equality comparison introspection on AssertionError for objects created using attrs or dataclasses (Python 3.7+, backported to 3.6).
* CACHEDIR.TAG files are now created inside cache directories.
Those files are part of the Cache Directory Tagging Standard, and can be used by backup or synchronization programs to identify pytest窶冱 cache directory as such.
* pytest.outcomes.Exit is derived from SystemExit instead of KeyboardInterrupt. This allows us to better handle pdb exiting.
* Updated the --collect-only option to display test descriptions when ran using --verbose.
* Restructured ExceptionInfo object construction and ensure incomplete instances have a repr/str.
* pdb: added support for keyword arguments with pdb.set_trace.
It handles header similar to Python 3.7 does it, and forwards any other keyword arguments to the Pdb constructor.
This allows for __import__("pdb").set_trace(skip=["foo.*"]).
* Added ini parameter junit_duration_report to optionally report test call durations, excluding setup and teardown times.
The JUnit XML specification and the default pytest behavior is to include setup and teardown times in the test duration report. You can include just the call durations instead (excluding setup and teardown) by adding this to your pytest.ini file:
[pytest]
junit_duration_report = call
* -ra now will show errors and failures last, instead of as the first items in the summary.
This makes it easier to obtain a list of errors and failures to run tests selectively.
* pytest.importorskip now supports a reason parameter, which will be shown when the requested module cannot be imported.

Bug Fixes
* -p now accepts its argument without a space between the value, for example -pmyplugin.
* approx again works with more generic containers, more precisely instances of Iterable and Sized instead of more restrictive Sequence.
* Ensure that node ids are printable.
* Fixed raises(..., 'code(string)') frame filename.
* Display actual test ids in --collect-only.

Improved Documentation
* Markers example documentation page updated to support latest pytest version.
* Update cache documentation example to correctly show cache hit and miss.
* Improved detailed summary report documentation.

Trivial/Internal Changes
* Changed the deprecation type of --result-log to PytestDeprecationWarning.


(adam)
diff -r1.68 -r1.69 pkgsrc/devel/py-test/Makefile
diff -r1.62 -r1.63 pkgsrc/devel/py-test/distinfo

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

--- pkgsrc/devel/py-test/Makefile 2018/12/14 14:44:21 1.68
+++ pkgsrc/devel/py-test/Makefile 2019/01/07 08:38:01 1.69
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1# $NetBSD: Makefile,v 1.68 2018/12/14 14:44:21 adam Exp $ 1# $NetBSD: Makefile,v 1.69 2019/01/07 08:38:01 adam Exp $
2 2
3DISTNAME= pytest-4.0.2 3DISTNAME= pytest-4.1.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= http://pytest.org/ 9HOMEPAGE= http://pytest.org/
10COMMENT= Python testing tool 10COMMENT= Python testing tool
11LICENSE= mit 11LICENSE= mit
12 12
13DEPENDS+= ${PYPKGPREFIX}-atomicwrites>=1.0:../../devel/py-atomicwrites 13DEPENDS+= ${PYPKGPREFIX}-atomicwrites>=1.0:../../devel/py-atomicwrites
14DEPENDS+= ${PYPKGPREFIX}-attrs>=17.4.0:../../devel/py-attrs 14DEPENDS+= ${PYPKGPREFIX}-attrs>=17.4.0:../../devel/py-attrs
15DEPENDS+= ${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat 15DEPENDS+= ${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat
16DEPENDS+= ${PYPKGPREFIX}-more-itertools>=4.0.0:../../devel/py-more-itertools 16DEPENDS+= ${PYPKGPREFIX}-more-itertools>=4.0.0:../../devel/py-more-itertools

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

--- pkgsrc/devel/py-test/distinfo 2018/12/14 14:44:21 1.62
+++ pkgsrc/devel/py-test/distinfo 2019/01/07 08:38:01 1.63
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
1$NetBSD: distinfo,v 1.62 2018/12/14 14:44:21 adam Exp $ 1$NetBSD: distinfo,v 1.63 2019/01/07 08:38:01 adam Exp $
2 2
3SHA1 (pytest-4.0.2.tar.gz) = 79de8e2e52adc537d3d124a751e3ab1e581f78f2 3SHA1 (pytest-4.1.0.tar.gz) = f50c439fc55a047de08270b2dee26bdc115ac106
4RMD160 (pytest-4.0.2.tar.gz) = a75e9cdff84591bd9c92c68836b943b349058119 4RMD160 (pytest-4.1.0.tar.gz) = 5713ad5a5494f0d5a5259d35f6d748e850b01098
5SHA512 (pytest-4.0.2.tar.gz) = 6c77024cdd0a14ad417d7acece89e6b06530ceec1d6950a7cae265bddff44182d1839ced59c34ed9add8eb55214d69f01bd77499b8d3b483ada5ba47bca28802 5SHA512 (pytest-4.1.0.tar.gz) = 30cbefa066728b72063b21190df74b7cbf56d045e87307915af45e3ff5cdbb76c79dd0c2428425c2db9f8f0ba99a116d787526dc806801787b89a7862dd9e56e
6Size (pytest-4.0.2.tar.gz) = 904958 bytes 6Size (pytest-4.1.0.tar.gz) = 902235 bytes