py-test: updated to 3.5.0

3.5.0:
Deprecations and Removals
record_xml_property fixture is now deprecated in favor of the more generic record_property.
Defining pytest_plugins is now deprecated in non-top-level conftest.py files, because they “leak” to the entire directory tree.

Features
New --show-capture command-line option that allows to specify how to display captured output when tests fail: no, stdout, stderr, log or all
New --rootdir command-line option to override the rules for discovering the root directory. See customize in the documentation for details.
Fixtures are now instantiated based on their scopes, with higher-scoped fixtures
record_xml_property renamed to record_property and is now compatible with xdist, markers and any reporter. record_xml_property name is now deprecated.
New --nf, --new-first options: run new tests first followed by the rest of the tests, in both cases tests are also sorted by the file modified time, with more recent files coming first.
New --last-failed-no-failures command-line option that allows to specify the behavior of the cache plugin’s `--last-failed feature when no tests failed in the last run
New --doctest-continue-on-failure command-line option to enable doctests to show multiple failures for each snippet, instead of stopping at the first failure.
Captured log messages are added to the <system-out> tag in the generated junit xml file if the junit_logging ini option is set to system-out. If the value of this ini option is system-err`, the logs are written to ``<system-err>. The default value for junit_logging is no, meaning captured logs are not written to the output file.
Allow the logging plugin to handle pytest_runtest_logstart and pytest_runtest_logfinish hooks when live logs are enabled.
Passing –log-cli-level in the command-line now automatically activates live logging.
Add command line option --deselect to allow deselection of individual tests at collection time.
Captured logs are printed before entering pdb.
Deselected item count is now shown before tests are run, e.g. collected X items / Y deselected.
The builtin module platform is now available for use in expressions in pytest.mark.
The short test summary info section now is displayed after tracebacks and warnings in the terminal.
New --verbosity flag to set verbosity level explicitly.
pytest.approx now accepts comparing a numpy array with a scalar.

Bug Fixes
Suppress IOError when closing the temporary file used for capturing streams in Python 2.7.
Fixed clear() method on caplog fixture which cleared records, but not the text property.
During test collection, when stdin is not allowed to be read, the DontReadFromStdin object still allow itself to be iterable and resolved to an iterator without crashing.

Improved Documentation
Added a reference page to the docs.

Trivial/Internal Changes
Change minimum requirement of attrs to 17.4.0.
Renamed example directories so all tests pass when ran from the base directory.
Internal mark.py module has been turned into a package.
pytest now depends on the more_itertools package.
Added warning when [pytest] section is used in a .cfg file passed with -c
nodeids can now be passed explicitly to FSCollector and Node constructors.
Internal refactoring of FormattedExcinfo to use attrs facilities and remove old support code for legacy Python versions.
Refactoring to unify how verbosity is handled internally.
Internal refactoring to better integrate with argparse.
Fix a python example when calling a fixture in doc/en/usage.rst
This commit is contained in:
adam 2018-03-23 08:58:00 +00:00
parent a8d579ebc0
commit 455b1c6501
3 changed files with 24 additions and 15 deletions

View file

@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.45 2018/03/06 08:33:36 adam Exp $
# $NetBSD: Makefile,v 1.46 2018/03/23 08:58:00 adam Exp $
DISTNAME= pytest-3.4.2
DISTNAME= pytest-3.5.0
PKGNAME= ${PYPKGPREFIX}-${DISTNAME:S/py//}
CATEGORIES= devel python
MASTER_SITES= ${MASTER_SITE_PYPI:=p/pytest/}
@ -10,15 +10,15 @@ HOMEPAGE= http://pytest.org/
COMMENT= Python testing tool
LICENSE= mit
DEPENDS+= ${PYPKGPREFIX}-attrs>=17.2.0:../../devel/py-attrs
DEPENDS+= ${PYPKGPREFIX}-attrs>=17.4.0:../../devel/py-attrs
DEPENDS+= ${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat
DEPENDS+= ${PYPKGPREFIX}-more-itertools>=4.0.0:../../devel/py-more-itertools
DEPENDS+= ${PYPKGPREFIX}-pluggy>=0.5:../../devel/py-pluggy
DEPENDS+= ${PYPKGPREFIX}-py>=1.4.29:../../devel/py-py
DEPENDS+= ${PYPKGPREFIX}-six-[0-9]*:../../lang/py-six
BUILD_DEPENDS+= ${PYPKGPREFIX}-setuptools_scm-[0-9]*:../../devel/py-setuptools_scm
# TEST_DEPENDS
BUILD_DEPENDS+= ${PYPKGPREFIX}-hypothesis-[0-9]*:../../devel/py-hypothesis
BUILD_DEPENDS+= ${PYPKGPREFIX}-yaml-[0-9]*:../../textproc/py-yaml
TEST_DEPENDS+= ${PYPKGPREFIX}-hypothesis-[0-9]*:../../devel/py-hypothesis
TEST_DEPENDS+= ${PYPKGPREFIX}-yaml-[0-9]*:../../textproc/py-yaml
.include "../../lang/python/pyversion.mk"
.if "${PYPKGPREFIX}" == "py27"

View file

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.9 2017/11/28 09:04:56 adam Exp $
@comment $NetBSD: PLIST,v 1.10 2018/03/23 08:58:00 adam Exp $
bin/py.test-${PYVERSSUFFIX}
bin/pytest-${PYVERSSUFFIX}
${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
@ -83,9 +83,18 @@ ${PYSITELIB}/_pytest/logging.pyo
${PYSITELIB}/_pytest/main.py
${PYSITELIB}/_pytest/main.pyc
${PYSITELIB}/_pytest/main.pyo
${PYSITELIB}/_pytest/mark.py
${PYSITELIB}/_pytest/mark.pyc
${PYSITELIB}/_pytest/mark.pyo
${PYSITELIB}/_pytest/mark/__init__.py
${PYSITELIB}/_pytest/mark/__init__.pyc
${PYSITELIB}/_pytest/mark/__init__.pyo
${PYSITELIB}/_pytest/mark/evaluate.py
${PYSITELIB}/_pytest/mark/evaluate.pyc
${PYSITELIB}/_pytest/mark/evaluate.pyo
${PYSITELIB}/_pytest/mark/legacy.py
${PYSITELIB}/_pytest/mark/legacy.pyc
${PYSITELIB}/_pytest/mark/legacy.pyo
${PYSITELIB}/_pytest/mark/structures.py
${PYSITELIB}/_pytest/mark/structures.pyc
${PYSITELIB}/_pytest/mark/structures.pyo
${PYSITELIB}/_pytest/monkeypatch.py
${PYSITELIB}/_pytest/monkeypatch.pyc
${PYSITELIB}/_pytest/monkeypatch.pyo

View file

@ -1,6 +1,6 @@
$NetBSD: distinfo,v 1.42 2018/03/06 08:33:36 adam Exp $
$NetBSD: distinfo,v 1.43 2018/03/23 08:58:00 adam Exp $
SHA1 (pytest-3.4.2.tar.gz) = 1194854795c65e29a1038da50fe5f5230f964360
RMD160 (pytest-3.4.2.tar.gz) = a14f6eac02521668d691b93dde59a2f0f8f78a4a
SHA512 (pytest-3.4.2.tar.gz) = 787065ab76d4482799bb2da9f024c9c383e68cc1cc01f3b80f6ed9444ca6383d20953615696ed4dd01668777b094cf5002b23c4ce51828879dcf8ebf2170c71b
Size (pytest-3.4.2.tar.gz) = 812719 bytes
SHA1 (pytest-3.5.0.tar.gz) = ebb431b74c018005d9298af34660c3f186235ccc
RMD160 (pytest-3.5.0.tar.gz) = ccf66ab8ba7125e7c565af48a8e4b6cd812470d7
SHA512 (pytest-3.5.0.tar.gz) = 031997650592a5c5697981c517082a8de0f585b63e9fcba57903163c0e87ab6a4206f93038ecc130530422547bfc0e03f765c8f260e52e51f2f9e0cb26ceeaa8
Size (pytest-3.5.0.tar.gz) = 830816 bytes