head	1.30;
access;
symbols
	pkgsrc-2026Q1:1.30.0.4
	pkgsrc-2026Q1-base:1.30
	pkgsrc-2025Q4:1.30.0.2
	pkgsrc-2025Q4-base:1.30
	pkgsrc-2025Q3:1.28.0.4
	pkgsrc-2025Q3-base:1.28
	pkgsrc-2025Q2:1.28.0.2
	pkgsrc-2025Q2-base:1.28
	pkgsrc-2025Q1:1.26.0.10
	pkgsrc-2025Q1-base:1.26
	pkgsrc-2024Q4:1.26.0.8
	pkgsrc-2024Q4-base:1.26
	pkgsrc-2024Q3:1.26.0.6
	pkgsrc-2024Q3-base:1.26
	pkgsrc-2024Q2:1.26.0.4
	pkgsrc-2024Q2-base:1.26
	pkgsrc-2024Q1:1.26.0.2
	pkgsrc-2024Q1-base:1.26
	pkgsrc-2023Q4:1.23.0.10
	pkgsrc-2023Q4-base:1.23
	pkgsrc-2023Q3:1.23.0.8
	pkgsrc-2023Q3-base:1.23
	pkgsrc-2023Q2:1.23.0.6
	pkgsrc-2023Q2-base:1.23
	pkgsrc-2023Q1:1.23.0.4
	pkgsrc-2023Q1-base:1.23
	pkgsrc-2022Q4:1.23.0.2
	pkgsrc-2022Q4-base:1.23
	pkgsrc-2022Q3:1.22.0.4
	pkgsrc-2022Q3-base:1.22
	pkgsrc-2022Q2:1.22.0.2
	pkgsrc-2022Q2-base:1.22
	pkgsrc-2022Q1:1.21.0.2
	pkgsrc-2022Q1-base:1.21
	pkgsrc-2021Q4:1.20.0.10
	pkgsrc-2021Q4-base:1.20
	pkgsrc-2021Q3:1.20.0.8
	pkgsrc-2021Q3-base:1.20
	pkgsrc-2021Q2:1.20.0.6
	pkgsrc-2021Q2-base:1.20
	pkgsrc-2021Q1:1.20.0.4
	pkgsrc-2021Q1-base:1.20
	pkgsrc-2020Q4:1.20.0.2
	pkgsrc-2020Q4-base:1.20
	pkgsrc-2020Q3:1.18.0.2
	pkgsrc-2020Q3-base:1.18
	pkgsrc-2020Q2:1.17.0.2
	pkgsrc-2020Q2-base:1.17
	pkgsrc-2020Q1:1.16.0.8
	pkgsrc-2020Q1-base:1.16
	pkgsrc-2019Q4:1.16.0.10
	pkgsrc-2019Q4-base:1.16
	pkgsrc-2019Q3:1.16.0.6
	pkgsrc-2019Q3-base:1.16
	pkgsrc-2019Q2:1.16.0.4
	pkgsrc-2019Q2-base:1.16
	pkgsrc-2019Q1:1.16.0.2
	pkgsrc-2019Q1-base:1.16
	pkgsrc-2018Q4:1.15.0.2
	pkgsrc-2018Q4-base:1.15
	pkgsrc-2018Q3:1.13.0.2
	pkgsrc-2018Q3-base:1.13
	pkgsrc-2018Q2:1.11.0.2
	pkgsrc-2018Q2-base:1.11
	pkgsrc-2018Q1:1.10.0.2
	pkgsrc-2018Q1-base:1.10
	pkgsrc-2017Q4:1.9.0.2
	pkgsrc-2017Q4-base:1.9
	pkgsrc-2017Q3:1.7.0.4
	pkgsrc-2017Q3-base:1.7
	pkgsrc-2017Q2:1.6.0.2
	pkgsrc-2017Q2-base:1.6
	pkgsrc-2017Q1:1.5.0.6
	pkgsrc-2017Q1-base:1.5
	pkgsrc-2016Q4:1.5.0.4
	pkgsrc-2016Q4-base:1.5
	pkgsrc-2016Q3:1.5.0.2
	pkgsrc-2016Q3-base:1.5
	pkgsrc-2016Q2:1.4.0.2
	pkgsrc-2016Q2-base:1.4
	pkgsrc-2016Q1:1.3.0.4
	pkgsrc-2016Q1-base:1.3
	pkgsrc-2015Q4:1.3.0.2
	pkgsrc-2015Q4-base:1.3
	pkgsrc-2015Q3:1.2.0.14
	pkgsrc-2015Q3-base:1.2
	pkgsrc-2015Q2:1.2.0.12
	pkgsrc-2015Q2-base:1.2
	pkgsrc-2015Q1:1.2.0.10
	pkgsrc-2015Q1-base:1.2
	pkgsrc-2014Q4:1.2.0.8
	pkgsrc-2014Q4-base:1.2
	pkgsrc-2014Q3:1.2.0.6
	pkgsrc-2014Q3-base:1.2
	pkgsrc-2014Q2:1.2.0.4
	pkgsrc-2014Q2-base:1.2
	pkgsrc-2014Q1:1.2.0.2
	pkgsrc-2014Q1-base:1.2
	pkgsrc-2013Q4:1.1.0.4
	pkgsrc-2013Q4-base:1.1
	pkgsrc-2013Q3:1.1.0.2
	pkgsrc-2013Q3-base:1.1;
locks; strict;
comment	@# @;


1.30
date	2025.12.07.08.23.20;	author adam;	state Exp;
branches;
next	1.29;
commitid	jTM2UU3d9qxz7slG;

1.29
date	2025.11.12.08.59.32;	author adam;	state Exp;
branches;
next	1.28;
commitid	ORDkxQgfVpxt7fiG;

1.28
date	2025.06.13.08.57.02;	author adam;	state Exp;
branches;
next	1.27;
commitid	ER82G7g72LyYZHYF;

1.27
date	2025.04.12.10.14.29;	author adam;	state Exp;
branches;
next	1.26;
commitid	5i7oG8OpSMm9qKQF;

1.26
date	2024.03.21.08.27.17;	author adam;	state Exp;
branches;
next	1.25;
commitid	IkKHrlrhBDARf03F;

1.25
date	2024.02.02.16.19.52;	author adam;	state Exp;
branches;
next	1.24;
commitid	7dgWC3jn4GkeqSWE;

1.24
date	2023.12.31.19.11.55;	author adam;	state Exp;
branches;
next	1.23;
commitid	Ysg9Ddju8MgYqESE;

1.23
date	2022.10.28.08.58.12;	author adam;	state Exp;
branches;
next	1.22;
commitid	g5dvMi0QdaLbPsZD;

1.22
date	2022.04.05.19.11.12;	author adam;	state Exp;
branches;
next	1.21;
commitid	ox2NzM7l2QsQP2zD;

1.21
date	2022.02.15.16.05.42;	author wiz;	state Exp;
branches;
next	1.20;
commitid	EqikDjNIgO3noJsD;

1.20
date	2020.12.14.06.21.38;	author adam;	state Exp;
branches;
next	1.19;
commitid	MjSKGA6ef6x4UFzC;

1.19
date	2020.10.22.09.45.20;	author adam;	state Exp;
branches;
next	1.18;
commitid	sGEb9h53wMJkJSsC;

1.18
date	2020.08.05.14.09.30;	author adam;	state Exp;
branches;
next	1.17;
commitid	ENAuccznEjPIHSiC;

1.17
date	2020.05.16.08.00.01;	author adam;	state Exp;
branches;
next	1.16;
commitid	bLV7Ni8PV6yCgr8C;

1.16
date	2019.02.01.11.52.22;	author adam;	state Exp;
branches;
next	1.15;
commitid	uCVnCn2V0d3bF3aB;

1.15
date	2018.11.05.08.36.25;	author adam;	state Exp;
branches;
next	1.14;
commitid	odqWiAwuDadupJYA;

1.14
date	2018.10.18.10.11.25;	author adam;	state Exp;
branches;
next	1.13;
commitid	BM0i7VEnZhKIvqWA;

1.13
date	2018.09.07.08.55.43;	author adam;	state Exp;
branches;
next	1.12;
commitid	Ub2osM3bb7tpp9RA;

1.12
date	2018.08.05.10.17.47;	author adam;	state Exp;
branches;
next	1.11;
commitid	wFJdVTiqnoi5VUMA;

1.11
date	2018.06.21.06.41.14;	author adam;	state Exp;
branches;
next	1.10;
commitid	T4ioCpdskJq0b7HA;

1.10
date	2018.03.23.08.58.00;	author adam;	state Exp;
branches;
next	1.9;
commitid	yye6XrLdfQC4PyvA;

1.9
date	2017.11.28.09.04.56;	author adam;	state Exp;
branches;
next	1.8;
commitid	xkjmUNbIT0TWyMgA;

1.8
date	2017.11.15.07.43.41;	author adam;	state Exp;
branches;
next	1.7;
commitid	yUO6WWXW0jQZw6fA;

1.7
date	2017.08.03.07.44.11;	author adam;	state Exp;
branches;
next	1.6;
commitid	C8OLxRUM6KwrSJ1A;

1.6
date	2017.05.23.08.30.11;	author adam;	state Exp;
branches;
next	1.5;
commitid	rJZl69kkLheGruSz;

1.5
date	2016.08.22.13.26.28;	author wiz;	state Exp;
branches;
next	1.4;
commitid	qo6VkgImeFqvTijz;

1.4
date	2016.04.13.18.39.21;	author wiz;	state Exp;
branches;
next	1.3;
commitid	G7N4ngXZlspEPu2z;

1.3
date	2015.10.19.09.44.10;	author wiz;	state Exp;
branches;
next	1.2;
commitid	WPbn2WAmy3s9zHFy;

1.2
date	2014.03.21.18.26.16;	author wiz;	state Exp;
branches;
next	1.1;
commitid	Ny5KQuKbk49WZAtx;

1.1
date	2013.07.24.10.46.38;	author drochner;	state Exp;
branches;
next	;
commitid	tXukFgimFXqFaIYw;


desc
@@


1.30
log
@py-test: updated to 9.0.2

9.0.2

Bug fixes

The terminal progress feature added in pytest 9.0.0 has been disabled by default, except on Windows, due to compatibility issues with some terminal emulators.
You may enable it again by passing -p terminalprogress. We may enable it by default again once compatibility improves in the future.

Additionally, when the environment variable TERM is dumb, the escape codes are no longer emitted, even if the plugin is enabled.

Fixed the TOML type of the tmp_path_retention_count settings in the API reference from number to string.
The private config.inicfg attribute was changed in a breaking manner in pytest 9.0.0. Due to its usage in the ecosystem, it is now restored to working order using a compatibility shim. It will be deprecated in pytest 9.1 and removed in pytest 10.
Fixed quadratic-time behavior when handling unittest subtests in Python 3.10.

Improved documentation

The API Reference now contains cross-reference-able documentation of pytest’s command-line flags.
@
text
@@@comment $NetBSD: PLIST,v 1.29 2025/11/12 08:59:32 adam Exp $
bin/py.test-${PYVERSSUFFIX}
bin/pytest-${PYVERSSUFFIX}
${PYSITELIB}/${WHEEL_INFODIR}/METADATA
${PYSITELIB}/${WHEEL_INFODIR}/RECORD
${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
${PYSITELIB}/${WHEEL_INFODIR}/entry_points.txt
${PYSITELIB}/${WHEEL_INFODIR}/licenses/LICENSE
${PYSITELIB}/${WHEEL_INFODIR}/top_level.txt
${PYSITELIB}/_pytest/__init__.py
${PYSITELIB}/_pytest/__init__.pyc
${PYSITELIB}/_pytest/__init__.pyo
${PYSITELIB}/_pytest/_argcomplete.py
${PYSITELIB}/_pytest/_argcomplete.pyc
${PYSITELIB}/_pytest/_argcomplete.pyo
${PYSITELIB}/_pytest/_code/__init__.py
${PYSITELIB}/_pytest/_code/__init__.pyc
${PYSITELIB}/_pytest/_code/__init__.pyo
${PYSITELIB}/_pytest/_code/code.py
${PYSITELIB}/_pytest/_code/code.pyc
${PYSITELIB}/_pytest/_code/code.pyo
${PYSITELIB}/_pytest/_code/source.py
${PYSITELIB}/_pytest/_code/source.pyc
${PYSITELIB}/_pytest/_code/source.pyo
${PYSITELIB}/_pytest/_io/__init__.py
${PYSITELIB}/_pytest/_io/__init__.pyc
${PYSITELIB}/_pytest/_io/__init__.pyo
${PYSITELIB}/_pytest/_io/pprint.py
${PYSITELIB}/_pytest/_io/pprint.pyc
${PYSITELIB}/_pytest/_io/pprint.pyo
${PYSITELIB}/_pytest/_io/saferepr.py
${PYSITELIB}/_pytest/_io/saferepr.pyc
${PYSITELIB}/_pytest/_io/saferepr.pyo
${PYSITELIB}/_pytest/_io/terminalwriter.py
${PYSITELIB}/_pytest/_io/terminalwriter.pyc
${PYSITELIB}/_pytest/_io/terminalwriter.pyo
${PYSITELIB}/_pytest/_io/wcwidth.py
${PYSITELIB}/_pytest/_io/wcwidth.pyc
${PYSITELIB}/_pytest/_io/wcwidth.pyo
${PYSITELIB}/_pytest/_py/__init__.py
${PYSITELIB}/_pytest/_py/__init__.pyc
${PYSITELIB}/_pytest/_py/__init__.pyo
${PYSITELIB}/_pytest/_py/error.py
${PYSITELIB}/_pytest/_py/error.pyc
${PYSITELIB}/_pytest/_py/error.pyo
${PYSITELIB}/_pytest/_py/path.py
${PYSITELIB}/_pytest/_py/path.pyc
${PYSITELIB}/_pytest/_py/path.pyo
${PYSITELIB}/_pytest/_version.py
${PYSITELIB}/_pytest/_version.pyc
${PYSITELIB}/_pytest/_version.pyo
${PYSITELIB}/_pytest/assertion/__init__.py
${PYSITELIB}/_pytest/assertion/__init__.pyc
${PYSITELIB}/_pytest/assertion/__init__.pyo
${PYSITELIB}/_pytest/assertion/rewrite.py
${PYSITELIB}/_pytest/assertion/rewrite.pyc
${PYSITELIB}/_pytest/assertion/rewrite.pyo
${PYSITELIB}/_pytest/assertion/truncate.py
${PYSITELIB}/_pytest/assertion/truncate.pyc
${PYSITELIB}/_pytest/assertion/truncate.pyo
${PYSITELIB}/_pytest/assertion/util.py
${PYSITELIB}/_pytest/assertion/util.pyc
${PYSITELIB}/_pytest/assertion/util.pyo
${PYSITELIB}/_pytest/cacheprovider.py
${PYSITELIB}/_pytest/cacheprovider.pyc
${PYSITELIB}/_pytest/cacheprovider.pyo
${PYSITELIB}/_pytest/capture.py
${PYSITELIB}/_pytest/capture.pyc
${PYSITELIB}/_pytest/capture.pyo
${PYSITELIB}/_pytest/compat.py
${PYSITELIB}/_pytest/compat.pyc
${PYSITELIB}/_pytest/compat.pyo
${PYSITELIB}/_pytest/config/__init__.py
${PYSITELIB}/_pytest/config/__init__.pyc
${PYSITELIB}/_pytest/config/__init__.pyo
${PYSITELIB}/_pytest/config/argparsing.py
${PYSITELIB}/_pytest/config/argparsing.pyc
${PYSITELIB}/_pytest/config/argparsing.pyo
${PYSITELIB}/_pytest/config/compat.py
${PYSITELIB}/_pytest/config/compat.pyc
${PYSITELIB}/_pytest/config/compat.pyo
${PYSITELIB}/_pytest/config/exceptions.py
${PYSITELIB}/_pytest/config/exceptions.pyc
${PYSITELIB}/_pytest/config/exceptions.pyo
${PYSITELIB}/_pytest/config/findpaths.py
${PYSITELIB}/_pytest/config/findpaths.pyc
${PYSITELIB}/_pytest/config/findpaths.pyo
${PYSITELIB}/_pytest/debugging.py
${PYSITELIB}/_pytest/debugging.pyc
${PYSITELIB}/_pytest/debugging.pyo
${PYSITELIB}/_pytest/deprecated.py
${PYSITELIB}/_pytest/deprecated.pyc
${PYSITELIB}/_pytest/deprecated.pyo
${PYSITELIB}/_pytest/doctest.py
${PYSITELIB}/_pytest/doctest.pyc
${PYSITELIB}/_pytest/doctest.pyo
${PYSITELIB}/_pytest/faulthandler.py
${PYSITELIB}/_pytest/faulthandler.pyc
${PYSITELIB}/_pytest/faulthandler.pyo
${PYSITELIB}/_pytest/fixtures.py
${PYSITELIB}/_pytest/fixtures.pyc
${PYSITELIB}/_pytest/fixtures.pyo
${PYSITELIB}/_pytest/freeze_support.py
${PYSITELIB}/_pytest/freeze_support.pyc
${PYSITELIB}/_pytest/freeze_support.pyo
${PYSITELIB}/_pytest/helpconfig.py
${PYSITELIB}/_pytest/helpconfig.pyc
${PYSITELIB}/_pytest/helpconfig.pyo
${PYSITELIB}/_pytest/hookspec.py
${PYSITELIB}/_pytest/hookspec.pyc
${PYSITELIB}/_pytest/hookspec.pyo
${PYSITELIB}/_pytest/junitxml.py
${PYSITELIB}/_pytest/junitxml.pyc
${PYSITELIB}/_pytest/junitxml.pyo
${PYSITELIB}/_pytest/legacypath.py
${PYSITELIB}/_pytest/legacypath.pyc
${PYSITELIB}/_pytest/legacypath.pyo
${PYSITELIB}/_pytest/logging.py
${PYSITELIB}/_pytest/logging.pyc
${PYSITELIB}/_pytest/logging.pyo
${PYSITELIB}/_pytest/main.py
${PYSITELIB}/_pytest/main.pyc
${PYSITELIB}/_pytest/main.pyo
${PYSITELIB}/_pytest/mark/__init__.py
${PYSITELIB}/_pytest/mark/__init__.pyc
${PYSITELIB}/_pytest/mark/__init__.pyo
${PYSITELIB}/_pytest/mark/expression.py
${PYSITELIB}/_pytest/mark/expression.pyc
${PYSITELIB}/_pytest/mark/expression.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
${PYSITELIB}/_pytest/nodes.py
${PYSITELIB}/_pytest/nodes.pyc
${PYSITELIB}/_pytest/nodes.pyo
${PYSITELIB}/_pytest/outcomes.py
${PYSITELIB}/_pytest/outcomes.pyc
${PYSITELIB}/_pytest/outcomes.pyo
${PYSITELIB}/_pytest/pastebin.py
${PYSITELIB}/_pytest/pastebin.pyc
${PYSITELIB}/_pytest/pastebin.pyo
${PYSITELIB}/_pytest/pathlib.py
${PYSITELIB}/_pytest/pathlib.pyc
${PYSITELIB}/_pytest/pathlib.pyo
${PYSITELIB}/_pytest/py.typed
${PYSITELIB}/_pytest/pytester.py
${PYSITELIB}/_pytest/pytester.pyc
${PYSITELIB}/_pytest/pytester.pyo
${PYSITELIB}/_pytest/pytester_assertions.py
${PYSITELIB}/_pytest/pytester_assertions.pyc
${PYSITELIB}/_pytest/pytester_assertions.pyo
${PYSITELIB}/_pytest/python.py
${PYSITELIB}/_pytest/python.pyc
${PYSITELIB}/_pytest/python.pyo
${PYSITELIB}/_pytest/python_api.py
${PYSITELIB}/_pytest/python_api.pyc
${PYSITELIB}/_pytest/python_api.pyo
${PYSITELIB}/_pytest/raises.py
${PYSITELIB}/_pytest/raises.pyc
${PYSITELIB}/_pytest/raises.pyo
${PYSITELIB}/_pytest/recwarn.py
${PYSITELIB}/_pytest/recwarn.pyc
${PYSITELIB}/_pytest/recwarn.pyo
${PYSITELIB}/_pytest/reports.py
${PYSITELIB}/_pytest/reports.pyc
${PYSITELIB}/_pytest/reports.pyo
${PYSITELIB}/_pytest/runner.py
${PYSITELIB}/_pytest/runner.pyc
${PYSITELIB}/_pytest/runner.pyo
${PYSITELIB}/_pytest/scope.py
${PYSITELIB}/_pytest/scope.pyc
${PYSITELIB}/_pytest/scope.pyo
${PYSITELIB}/_pytest/setuponly.py
${PYSITELIB}/_pytest/setuponly.pyc
${PYSITELIB}/_pytest/setuponly.pyo
${PYSITELIB}/_pytest/setupplan.py
${PYSITELIB}/_pytest/setupplan.pyc
${PYSITELIB}/_pytest/setupplan.pyo
${PYSITELIB}/_pytest/skipping.py
${PYSITELIB}/_pytest/skipping.pyc
${PYSITELIB}/_pytest/skipping.pyo
${PYSITELIB}/_pytest/stash.py
${PYSITELIB}/_pytest/stash.pyc
${PYSITELIB}/_pytest/stash.pyo
${PYSITELIB}/_pytest/stepwise.py
${PYSITELIB}/_pytest/stepwise.pyc
${PYSITELIB}/_pytest/stepwise.pyo
${PYSITELIB}/_pytest/subtests.py
${PYSITELIB}/_pytest/subtests.pyc
${PYSITELIB}/_pytest/subtests.pyo
${PYSITELIB}/_pytest/terminal.py
${PYSITELIB}/_pytest/terminal.pyc
${PYSITELIB}/_pytest/terminal.pyo
${PYSITELIB}/_pytest/terminalprogress.py
${PYSITELIB}/_pytest/terminalprogress.pyc
${PYSITELIB}/_pytest/terminalprogress.pyo
${PYSITELIB}/_pytest/threadexception.py
${PYSITELIB}/_pytest/threadexception.pyc
${PYSITELIB}/_pytest/threadexception.pyo
${PYSITELIB}/_pytest/timing.py
${PYSITELIB}/_pytest/timing.pyc
${PYSITELIB}/_pytest/timing.pyo
${PYSITELIB}/_pytest/tmpdir.py
${PYSITELIB}/_pytest/tmpdir.pyc
${PYSITELIB}/_pytest/tmpdir.pyo
${PYSITELIB}/_pytest/tracemalloc.py
${PYSITELIB}/_pytest/tracemalloc.pyc
${PYSITELIB}/_pytest/tracemalloc.pyo
${PYSITELIB}/_pytest/unittest.py
${PYSITELIB}/_pytest/unittest.pyc
${PYSITELIB}/_pytest/unittest.pyo
${PYSITELIB}/_pytest/unraisableexception.py
${PYSITELIB}/_pytest/unraisableexception.pyc
${PYSITELIB}/_pytest/unraisableexception.pyo
${PYSITELIB}/_pytest/warning_types.py
${PYSITELIB}/_pytest/warning_types.pyc
${PYSITELIB}/_pytest/warning_types.pyo
${PYSITELIB}/_pytest/warnings.py
${PYSITELIB}/_pytest/warnings.pyc
${PYSITELIB}/_pytest/warnings.pyo
${PYSITELIB}/py.py
${PYSITELIB}/py.pyc
${PYSITELIB}/py.pyo
${PYSITELIB}/pytest/__init__.py
${PYSITELIB}/pytest/__init__.pyc
${PYSITELIB}/pytest/__init__.pyo
${PYSITELIB}/pytest/__main__.py
${PYSITELIB}/pytest/__main__.pyc
${PYSITELIB}/pytest/__main__.pyo
${PYSITELIB}/pytest/py.typed
@


1.29
log
@py-test: updated to 9.0.0

pytest 9.0.0

New features
- Support for subtests has been added.
- Added support for native TOML configuration files.
- Added a “strict mode” enabled by the strict configuration option.
- Added the strict_parametrization_ids configuration option.
- Added support for displaying test session progress in the terminal tab using the OSC 9;4; ANSI sequence.
- Support PEP420 (implicit namespace packages) as --pyargs target when consider_namespace_packages is true in the config.
- Added a new faulthandler_exit_on_timeout configuration option set to “false” by default to let faulthandler interrupt the pytest process after a timeout in case of deadlock.
- Added support for configuration option aliases via the aliases parameter in Parser.addini().

https://docs.pytest.org/en/stable/changelog.html
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.28 2025/06/13 08:57:02 adam Exp $
d197 3
@


1.28
log
@py-test: updated to 8.4.0

8.4.0
https://docs.pytest.org/en/stable/changelog.html#pytest-8-4-0-2025-06-02
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.27 2025/04/12 10:14:29 adam Exp $
a7 1
${PYSITELIB}/${WHEEL_INFODIR}/licenses/AUTHORS
d191 3
@


1.27
log
@Fix PLIST after py-setuptools update; bump depends and revision
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.26 2024/03/21 08:27:17 adam Exp $
d162 3
a164 3
${PYSITELIB}/_pytest/python_path.py
${PYSITELIB}/_pytest/python_path.pyc
${PYSITELIB}/_pytest/python_path.pyo
d204 3
@


1.26
log
@py-test: updated to 8.1.1

pytest 8.1.1 (2024-03-08)
=========================

This release is not a usual bug fix release -- it contains features and improvements, being a follow up
to ``8.1.0``, which has been yanked from PyPI.

Features
--------

- Added the new :confval:`consider_namespace_packages` configuration option, defaulting to ``False``.

  If set to ``True``, pytest will attempt to identify modules that are part of `namespace packages <https://packaging.python.org/en/latest/guides/packaging-namespace-packages>`__ when importing modules.


- Added the new :confval:`verbosity_test_cases` configuration option for fine-grained control of test execution verbosity.
  See :ref:`Fine-grained verbosity <pytest.fine_grained_verbosity>` for more details.



Improvements
------------

- :func:`pytest.warns` now validates that :func:`warnings.warn` was called with a `str` or a `Warning`.
  Currently in Python it is possible to use other types, however this causes an exception when :func:`warnings.filterwarnings` is used to filter those warnings.
  While this can be considered a bug in CPython, we decided to put guards in pytest as the error message produced without this check in place is confusing.

- When using ``--override-ini`` for paths in invocations without a configuration file defined, the current working directory is used
  as the relative directory.

  Previoulsy this would raise an :class:`AssertionError`.

- :ref:`--import-mode=importlib <import-mode-importlib>` now tries to import modules using the standard import mechanism (but still without changing :py:data:`sys.path`), falling back to importing modules directly only if that fails.

  This means that installed packages will be imported under their canonical name if possible first, for example ``app.core.models``, instead of having the module name always be derived from their path (for example ``.env310.lib.site_packages.app.core.models``).

- Added the :func:`iter_parents() <_pytest.nodes.Node.iter_parents>` helper method on nodes.
  It is similar to :func:`listchain <_pytest.nodes.Node.listchain>`, but goes from bottom to top, and returns an iterator, not a list.

- Added support for :data:`sys.last_exc` for post-mortem debugging on Python>=3.12.

- In case no other suitable candidates for configuration file are found, a ``pyproject.toml`` (even without a ``[tool.pytest.ini_options]`` table) will be considered as the configuration file and define the ``rootdir``.

- Add ``--log-file-mode`` option to the logging plugin, enabling appending to log-files. This option accepts either ``"w"`` or ``"a"`` and defaults to ``"w"``.

  Previously, the mode was hard-coded to be ``"w"`` which truncates the file before logging.

- When multiple finalizers of a fixture raise an exception, now all exceptions are reported as an exception group.
  Previously, only the first exception was reported.


Bug Fixes
---------

- Fixed regression where ``--importmode=importlib`` would import non-test modules more than once.

- Fixed a regression in pytest 8.0.0 that would cause test collection to fail due to permission errors when using ``--pyargs``.

  This change improves the collection tree for tests specified using ``--pyargs``, see :pull:`12043` for a comparison with pytest 8.0 and <8.

- Fixed a regression in 8.0.1 whereby ``setup_module`` xunit-style fixtures are not executed when ``--doctest-modules`` is passed.

- Fix the ``stacklevel`` used when warning about marks used on fixtures.

- Fixed a regression in ``8.0.2`` where tests created using :fixture:`tmp_path` have been collected multiple times in CI under Windows.


Improved Documentation
----------------------

- Documented the retention of temporary directories created using the ``tmp_path`` fixture in more detail.


Trivial/Internal Changes
------------------------

- Some changes were made to private functions which may affect plugins which access them:

  - ``FixtureManager._getautousenames()`` now takes a ``Node`` itself instead of the nodeid.
  - ``FixtureManager.getfixturedefs()`` now takes the ``Node`` itself instead of the nodeid.
  - The ``_pytest.nodes.iterparentnodeids()`` function is removed without replacement.
    Prefer to traverse the node hierarchy itself instead.
    If you really need to, copy the function from the previous pytest release.

- Delayed the deprecation of the following features to ``9.0.0``:

  * :ref:`node-ctor-fspath-deprecation`.
  * :ref:`legacy-path-hooks-deprecated`.

  It was discovered after ``8.1.0`` was released that the warnings about the impeding removal were not being displayed, so the team decided to revert the removal.

  This is the reason for ``8.1.0`` being yanked.
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.25 2024/02/02 16:19:52 adam Exp $
a3 2
${PYSITELIB}/${WHEEL_INFODIR}/AUTHORS
${PYSITELIB}/${WHEEL_INFODIR}/LICENSE
d8 2
@


1.25
log
@py-test: updated to 8.0.0

pytest 8.0.0 (2024-01-27)
Bug Fixes
* Properly escape the reason of a skip mark when writing JUnit XML files.
* Avoid microsecond exceeds 1_000_000 when using log-date-format with %f specifier, which might cause the test suite to crash.

https://docs.pytest.org/en/stable/changelog.html
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.24 2023/12/31 19:11:55 adam Exp $
d4 1
a139 3
${PYSITELIB}/_pytest/nose.py
${PYSITELIB}/_pytest/nose.pyc
${PYSITELIB}/_pytest/nose.pyo
@


1.24
log
@py-test: updated to 7.4.4

pytest 7.4.4 (2023-12-31)

Bug Fixes

- Fix non-string constants at the top of file being detected as docstrings on Python>=3.8.
- Handle an edge case where :data:`sys.stderr` and :data:`sys.__stderr__` might already be closed when :ref:`faulthandler` is tearing down.
- Fixed tracebacks from collection errors not getting pruned.
- Removed unhelpful error message from assertion rewrite mechanism when exceptions are raised in ``__iter__`` methods. Now they are treated un-iterable instead.

Improved Documentation

- Updated documentation to refer to hyphenated options: replaced ``--junitxml`` with ``--junit-xml`` and ``--collectonly`` with ``--collect-only``.
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.23 2022/10/28 08:58:12 adam Exp $
d28 3
@


1.23
log
@py-test: updated to 7.2.0

pytest 7.2.0 (2022-10-23)

Deprecations
* Update pytest.PytestUnhandledCoroutineWarning to a deprecation; it will raise an error in pytest 8.

* pytest no longer depends on the py library. pytest provides a vendored copy of py.error and py.path modules but will use the py library if it is installed. If you need other py.* modules, continue to install the deprecated py library separately, otherwise it can usually be removed as a dependency.

* Deprecate configuring hook specs/impls using attributes/marks.

Instead use pytest.hookimpl() and pytest.hookspec(). For more details, see the docs.

* The functionality for running tests written for nose has been officially deprecated.

This includes:

Plain setup and teardown functions and methods: this might catch users by surprise, as setup() and teardown() are not pytest idioms, but part of the nose support.
Setup/teardown using the @@with_setup decorator.
For more details, consult the deprecation docs.

* A deprecation warning is now emitted if a test function returns something other than None. This prevents a common mistake among beginners that expect that returning a bool (for example return foo(a, b) == result) would cause a test to pass or fail, instead of using assert. The plan is to make returning non-None from tests an error in the future.
Features
* Added shell-style wildcard support to testpaths.

Improvements
* @@pytest.mark.parametrize() (and similar functions) now accepts any Sequence[str] for the argument names, instead of just list[str] and tuple[str, ...].

(Note that str, which is itself a Sequence[str], is still treated as a comma-delimited name list, as before).

* The --no-showlocals flag has been added. This can be passed directly to tests to override --showlocals declared through addopts.

* Assertion failures with strings in NFC and NFD forms that normalize to the same string now have a dedicated error message detailing the issue, and their utf-8 representation is expressed instead.

* Introduce multiline display for warning matching via pytest.warns() and enhance match comparison for _pytest._code.ExceptionInfo.match() as returned by pytest.raises().

* Improve pytest.raises(). Previously passing an empty tuple would give a confusing error. We now raise immediately with a more helpful message.

* On Python 3.11, use the standard library’s tomllib to parse TOML.

tomli is no longer a dependency on Python 3.11.

* Display assertion message without escaped newline characters with -vv.

* Improved error message that is shown when no collector is found for a given file.

* Some coloring has been added to the short test summary.

* Normalize the help description of all command-line options.

* Display full crash messages in short test summary info, when running in a CI environment.

* Added support for hidden configuration file by allowing .pytest.ini as an alternative to pytest.ini.

Bug Fixes
* sys.stdin now contains all expected methods of a file-like object when capture is enabled.

* Do not break into pdb when raise unittest.SkipTest() appears top-level in a file.

* Marks are now inherited according to the full MRO in test classes. Previously, if a test class inherited from two or more classes, only marks from the first super-class would apply.

When inheriting marks from super-classes, marks from the sub-classes are now ordered before marks from the super-classes, in MRO order. Previously it was the reverse.

When inheriting marks from super-classes, the pytestmark attribute of the sub-class now only contains the marks directly applied to it. Previously, it also contained marks from its super-classes. Please note that this attribute should not normally be accessed directly; use pytest.Node.iter_markers() instead.

* Showing inner exceptions by forcing native display in ExceptionGroups even when using display options other than --tb=native. A temporary step before full implementation of pytest-native display for inner exceptions in ExceptionGroups.

* Ensure caplog.get_records(when) returns current/correct data after invoking caplog.clear().

Improved Documentation
* Update information on writing plugins to use pyproject.toml instead of setup.py.
* The documentation is now built using Sphinx 5.x (up from 3.x previously).
* Update documentation on how pytest.warns() affects DeprecationWarning.
Trivial/Internal Changes
* Made _pytest.doctest.DoctestItem export pytest.DoctestItem for type check and runtime purposes. Made _pytest.doctest use internal APIs to avoid circular imports.
* Made _pytest.compat re-export importlib_metadata in the eyes of type checkers.
* Fix default encoding warning (EncodingWarning) in cacheprovider
* Improve the error message when we attempt to access a fixture that has been torn down. Add an additional sentence to the docstring explaining when it’s not a good idea to call getfixturevalue.
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.22 2022/04/05 19:11:12 adam Exp $
d4 6
a9 7
${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
${PYSITELIB}/${EGG_INFODIR}/entry_points.txt
${PYSITELIB}/${EGG_INFODIR}/not-zip-safe
${PYSITELIB}/${EGG_INFODIR}/requires.txt
${PYSITELIB}/${EGG_INFODIR}/top_level.txt
@


1.22
log
@py-test: updated to 7.1.1

pytest 7.1.1 (2022-03-17)
=========================

Bug Fixes
---------
- Fixed a regression in pytest 7.1.0 where some conftest.py files outside of the source tree (e.g. in the `site-packages` directory) were not picked up.


pytest 7.1.0 (2022-03-13)
=========================

Breaking Changes
----------------

- As per our policy, the following features have been deprecated in the 6.X series and are now
  removed:

  * ``pytest._fillfuncargs`` function.
  * ``pytest_warning_captured`` hook - use ``pytest_warning_recorded`` instead.
  * ``-k -foobar`` syntax - use ``-k 'not foobar'`` instead.
  * ``-k foobar:`` syntax.
  * ``pytest.collect`` module - import from ``pytest`` directly.

  For more information consult
  `Deprecations and Removals <https://docs.pytest.org/en/latest/deprecations.html>`__ in the docs.

- Dropped support for Python 3.6, which reached `end-of-life <https://devguide.python.org/#status-of-python-branches>`__ at 2021-12-23.


Improvements
------------

- Fixed test output for some data types where ``-v`` would show less information.
  Also, when showing diffs for sequences, ``-q`` would produce full diffs instead of the expected diff.

- pytest now avoids specialized assert formatting when it is detected that the default ``__eq__`` is overridden in ``attrs`` or ``dataclasses``.

- When ``-vv`` is given on command line, show skipping and xfail reasons in full instead of truncating them to fit the terminal width.

- More information about the location of resources that led Python to raise :class:`ResourceWarning` can now
  be obtained by enabling :mod:`tracemalloc`.

  See :ref:`resource-warnings` for more information.

- More types are now accepted in the ``ids`` argument to ``@@pytest.mark.parametrize``.
  Previously only `str`, `float`, `int` and `bool` were accepted;
  now `bytes`, `complex`, `re.Pattern`, `Enum` and anything with a `__name__` are also accepted.

- :func:`pytest.approx` now raises a :class:`TypeError` when given an unordered sequence (such as :class:`set`).

  Note that this implies that custom classes which only implement ``__iter__`` and ``__len__`` are no longer supported as they don't guarantee order.


Bug Fixes
---------

- The deprecation of raising :class:`unittest.SkipTest` to skip collection of
  tests during the pytest collection phase is reverted - this is now a supported
  feature again.

- Symbolic link components are no longer resolved in conftest paths.
  This means that if a conftest appears twice in collection tree, using symlinks, it will be executed twice.
  For example, given

      tests/real/conftest.py
      tests/real/test_it.py
      tests/link -> tests/real

  running ``pytest tests`` now imports the conftest twice, once as ``tests/real/conftest.py`` and once as ``tests/link/conftest.py``.
  This is a fix to match a similar change made to test collection itself in pytest 6.0 (see :pull:`6523` for details).

- Fixed count of selected tests on terminal collection summary when there were errors or skipped modules.

  If there were errors or skipped modules on collection, pytest would mistakenly subtract those from the selected count.

- Fixed regression where ``--import-mode=importlib`` used together with :envvar:`PYTHONPATH` or :confval:`pythonpath` would cause import errors in test suites.

- :fixture:`pytester` now requests a :fixture:`monkeypatch` fixture instead of creating one internally. This solves some issues with tests that involve pytest environment variables.

- Malformed ``pyproject.toml`` files now produce a clearer error message.
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.21 2022/02/15 16:05:42 wiz Exp $
d38 9
d216 3
@


1.21
log
@py-test: update to 7.0.1.

pytest 7.0.1 (2022-02-11)

Bug Fixes

    #9608: Fix invalid importing of importlib.readers in Python
    3.9.

    #9610: Restore UnitTestFunction.obj to return unbound rather
    than bound method. Fixes a crash during a failed teardown in
    unittest TestCases with non-default __init__. Regressed in
    pytest 7.0.0.

    #9636: The pythonpath plugin was renamed to python_path. This
    avoids a conflict with the pytest-pythonpath plugin.

    #9642: Fix running tests by id with :: in the parametrize
    portion.

    #9643: Delay issuing a PytestWarning about diamond inheritance
    involving Item and Collector so it can be filtered using standard
    warning filters.

pytest 7.0.0 (2022-02-03)

(Please see the full set of changes for this release also in the
7.0.0rc1 notes below) Deprecations

    #9488: If custom subclasses of nodes like pytest.Item override
    the __init__ method, they should take **kwargs. See Constructors
    of custom pytest.Node subclasses should take **kwargs for
    details.

    Note that a deprection warning is only emitted when there is
    a conflict in the arguments pytest expected to pass. This
    deprecation was already part of pytest 7.0.0rc1 but wasn’t
    documented.

Bug Fixes

    #9355: Fixed error message prints function decorators when
    using assert in Python 3.8 and above.

    #9396: Ensure pytest.Config.inifile is available during the
    pytest_cmdline_main hook (regression during 7.0.0rc1).

Improved Documentation

    #9404: Added extra documentation on alternatives to common
    misuses of pytest.warns(None) ahead of its deprecation.

    #9505: Clarify where the configuration files are located. To
    avoid confusions documentation mentions that configuration file
    is located in the root of the repository.

pytest 7.0.0rc1 (2021-12-06)

Breaking Changes

    #7259: The Node.reportinfo() function first return value type
    has been expanded from py.path.local | str to os.PathLike[str]
    | str.

    Most plugins which refer to reportinfo() only define it as part
    of a custom pytest.Item implementation. Since py.path.local is
    a os.PathLike[str], these plugins are unaffacted.

    Plugins and users which call reportinfo(), use the first return
    value and interact with it as a py.path.local, would need to
    adjust by calling py.path.local(fspath). Although preferably,
    avoid the legacy py.path.local and use pathlib.Path, or use
    item.location or item.path, instead.

    Note: pytest was not able to provide a deprecation period for
    this change.

    #8246: --version now writes version information to stdout rather
    than stderr.

    #8733: Drop a workaround for pyreadline that made it work with
    --pdb.

    The workaround was introduced in #1281 in 2015, however since
    then pyreadline seems to have gone unmaintained, is generating
    warnings, and will stop working on Python 3.10.

    #9061: Using pytest.approx() in a boolean context now raises
    an error hinting at the proper usage.

    It is apparently common for users to mistakenly use pytest.approx
    like this:

    assert pytest.approx(actual, expected)

    While the correct usage is:

    assert actual == pytest.approx(expected)

    The new error message helps catch those mistakes.

    #9277: The pytest.Instance collector type has been removed.
    Importing pytest.Instance or _pytest.python.Instance returns
    a dummy type and emits a deprecation warning. See The
    pytest.Instance collector for details.

    #9308: PytestRemovedIn7Warning deprecation warnings are now
    errors by default.

    Following our plan to remove deprecated features with as little
    disruption as possible, all warnings of type PytestRemovedIn7Warning
    now generate errors instead of warning messages by default.

    The affected features will be effectively removed in pytest
    7.1, so please consult the Deprecations and Removals section
    in the docs for directions on how to update existing code.

    In the pytest 7.0.X series, it is possible to change the errors
    back into warnings as a stopgap measure by adding this to your
    pytest.ini file:

    [pytest] filterwarnings =
	ignore::pytest.PytestRemovedIn7Warning

    But this will stop working when pytest 7.1 is released.

    If you have concerns about the removal of a specific feature,
    please add a comment to issue #9308.

Deprecations

    #7259: py.path.local arguments for hooks have been deprecated.
    See the deprecation note for full details.

    py.path.local arguments to Node constructors have been deprecated.
    See the deprecation note for full details.

    Note

    The name of the Node arguments and attributes (the new attribute
    being path) is the opposite of the situation for hooks (the
    old argument being path).

    This is an unfortunate artifact due to historical reasons,
    which should be resolved in future versions as we slowly get
    rid of the py dependency (see issue #9283 for a longer discussion).

    #7469: Directly constructing the following classes is now
    deprecated:

	_pytest.mark.structures.Mark

	_pytest.mark.structures.MarkDecorator

	_pytest.mark.structures.MarkGenerator

	_pytest.python.Metafunc

	_pytest.runner.CallInfo

	_pytest._code.ExceptionInfo

	_pytest.config.argparsing.Parser

	_pytest.config.argparsing.OptionGroup

	_pytest.pytester.HookRecorder

    These constructors have always been considered private, but
    now issue a deprecation warning, which may become a hard error
    in pytest 8.

    #8242: Raising unittest.SkipTest to skip collection of tests
    during the pytest collection phase is deprecated. Use pytest.skip()
    instead.

    Note: This deprecation only relates to using unittest.SkipTest
    during test collection. You are probably not doing that. Ordinary
    usage of unittest.SkipTest / unittest.TestCase.skipTest() /
    unittest.skip() in unittest test cases is fully supported.

    #8315: Several behaviors of Parser.addoption are now scheduled
    for removal in pytest 8 (deprecated since pytest 2.4.0):

	parser.addoption(..., help=".. %default ..") - use %(default)s
	instead.

	parser.addoption(..., type="int/string/float/complex") -
	use type=int etc. instead.

    #8447: Defining a custom pytest node type which is both an
    pytest.Item and a pytest.Collector (e.g. pytest.File) now issues
    a warning. It was never sanely supported and triggers hard to
    debug errors.

    See the deprecation note for full details.

    #8592: pytest_cmdline_preparse has been officially deprecated.
    It will be removed in a future release. Use
    pytest_load_initial_conftests instead.

    See the deprecation note for full details.

    #8645: pytest.warns(None) is now deprecated because many people
    used it to mean “this code does not emit warnings”, but it
    actually had the effect of checking that the code emits at
    least one warning of any type - like pytest.warns() or
    pytest.warns(Warning).

    #8948: pytest.skip(msg=...), pytest.fail(msg=...) and
    pytest.exit(msg=...) signatures now accept a reason argument
    instead of msg. Using msg still works, but is deprecated and
    will be removed in a future release.

    This was changed for consistency with pytest.mark.skip and
    pytest.mark.xfail which both accept reason as an argument.

    #8174: The following changes have been made to types reachable
    through pytest.ExceptionInfo.traceback:

	The path property of _pytest.code.Code returns Path instead
	of py.path.local.

	The path property of _pytest.code.TracebackEntry returns
	Path instead of py.path.local.

    There was no deprecation period for this change (sorry!).

Features

    #5196: Tests are now ordered by definition order in more cases.

    In a class hierarchy, tests from base classes are now consistently
    ordered before tests defined on their subclasses (reverse MRO
    order).

    #7132: Added two environment variables PYTEST_THEME and
    PYTEST_THEME_MODE to let the users customize the pygments theme
    used.

    #7259: Added cache.mkdir(), which is similar to the existing
    cache.makedir(), but returns a pathlib.Path instead of a legacy
    py.path.local.

    Added a paths type to parser.addini(), as in parser.addini("mypaths",
    "my paths", type="paths"), which is similar to the existing
    pathlist, but returns a list of pathlib.Path instead of legacy
    py.path.local.

    #7469: The types of objects used in pytest’s API are now exported
    so they may be used in type annotations.

    The newly-exported types are:

	pytest.Config for Config.

	pytest.Mark for marks.

	pytest.MarkDecorator for mark decorators.

	pytest.MarkGenerator for the pytest.mark singleton.

	pytest.Metafunc for the metafunc argument to the
	pytest_generate_tests hook.

	pytest.CallInfo for the CallInfo type passed to various
	hooks.

	pytest.PytestPluginManager for PytestPluginManager.

	pytest.ExceptionInfo for the ExceptionInfo type returned
	from pytest.raises() and passed to various hooks.

	pytest.Parser for the Parser type passed to the pytest_addoption
	hook.

	pytest.OptionGroup for the OptionGroup type returned from
	the parser.addgroup method.

	pytest.HookRecorder for the HookRecorder type returned from
	Pytester.

	pytest.RecordedHookCall for the RecordedHookCall type
	returned from HookRecorder.

	pytest.RunResult for the RunResult type returned from
	Pytester.

	pytest.LineMatcher for the LineMatcher type used in RunResult
	and others.

	pytest.TestReport for the TestReport type used in various
	hooks.

	pytest.CollectReport for the CollectReport type used in
	various hooks.

    Constructing most of them directly is not supported; they are
    only meant for use in type annotations. Doing so will emit a
    deprecation warning, and may become a hard-error in pytest 8.0.

    Subclassing them is also not supported. This is not currently
    enforced at runtime, but is detected by type-checkers such as
    mypy.

    #7856: –import-mode=importlib now works with features that
    depend on modules being on sys.modules, such as pickle and
    dataclasses.

    #8144: The following hooks now receive an additional pathlib.Path
    argument, equivalent to an existing py.path.local argument:

	pytest_ignore_collect - The collection_path parameter
	(equivalent to existing path parameter).

	pytest_collect_file - The file_path parameter (equivalent
	to existing path parameter).

	pytest_pycollect_makemodule - The module_path parameter
	(equivalent to existing path parameter).

	pytest_report_header - The start_path parameter (equivalent
	to existing startdir parameter).

	pytest_report_collectionfinish - The start_path parameter
	(equivalent to existing startdir parameter).

    Note

    The name of the Node arguments and attributes (the new attribute
    being path) is the opposite of the situation for hooks (the
    old argument being path).

    This is an unfortunate artifact due to historical reasons,
    which should be resolved in future versions as we slowly get
    rid of the py dependency (see issue #9283 for a longer discussion).

    #8251: Implement Node.path as a pathlib.Path. Both the old
    fspath and this new attribute gets set no matter whether path
    or fspath (deprecated) is passed to the constructor. It is a
    replacement for the fspath attribute (which represents the same
    path as py.path.local). While fspath is not deprecated yet due
    to the ongoing migration of methods like reportinfo(), we expect
    to deprecate it in a future release.

    Note

    The name of the Node arguments and attributes (the new attribute
    being path) is the opposite of the situation for hooks (the
    old argument being path).

    This is an unfortunate artifact due to historical reasons,
    which should be resolved in future versions as we slowly get
    rid of the py dependency (see issue #9283 for a longer discussion).

    #8421: pytest.approx() now works on Decimal within mappings/dicts
    and sequences/lists.

    #8606: pytest invocations with --fixtures-per-test and --fixtures
    have been enriched with:

	Fixture location path printed with the fixture name.

	First section of the fixture’s docstring printed under the
	fixture name.

	Whole of fixture’s docstring printed under the fixture name
	using --verbose option.

    #8761: New pytest.version_tuple attribute, which makes it
    simpler for users to do something depending on the pytest
    version (such as declaring hooks which are introduced in later
    versions).

    #8789: Switch TOML parser from toml to tomli for TOML v1.0.0
    support in pyproject.toml.

    #8920: Added pytest.Stash, a facility for plugins to store
    their data on Config and Nodes in a type-safe and conflict-free
    manner. See Storing data on items across hook functions for
    details.

    #8953: RunResult method assert_outcomes now accepts a warnings
    argument to assert the total number of warnings captured.

    #8954: --debug flag now accepts a str file to route debug logs
    into, remains defaulted to pytestdebug.log.

    #9023: Full diffs are now always shown for equality assertions
    of iterables when CI or BUILD_NUMBER is found in the environment,
    even when -v isn’t used.

    #9113: RunResult method assert_outcomes now accepts a deselected
    argument to assert the total number of deselected tests.

    #9114: Added pythonpath setting that adds listed paths to
    sys.path for the duration of the test session. If you currently
    use the pytest-pythonpath or pytest-srcpaths plugins, you should
    be able to replace them with built-in pythonpath setting.

Improvements

    #7480: A deprecation scheduled to be removed in a major version
    X (e.g. pytest 7, 8, 9, …) now uses warning category
    PytestRemovedInXWarning, a subclass of PytestDeprecationWarning,
    instead of PytestDeprecationWarning directly.

    See Backwards Compatibility Policy for more details.

    #7864: Improved error messages when parsing warning filters.

    Previously pytest would show an internal traceback, which
    besides being ugly sometimes would hide the cause of the problem
    (for example an ImportError while importing a specific warning
    type).

    #8335: Improved pytest.approx() assertion messages for sequences
    of numbers.

    The assertion messages now dumps a table with the index and
    the error of each diff. Example:

    >       assert [1, 2, 3, 4] == pytest.approx([1, 3, 3, 5]) E
    assert comparison failed for 2 values:  E         Index |
    Obtained | Expected E         1     | 2        | 3 +- 3.0e-06
    E         3     | 4        | 5 +- 5.0e-06

    #8403: By default, pytest will truncate long strings in assert
    errors so they don’t clutter the output too much, currently at
    240 characters by default.

    However, in some cases the longer output helps, or is even
    crucial, to diagnose a failure. Using -v will now increase the
    truncation threshold to 2400 characters, and -vv or higher will
    disable truncation entirely.

    #8509: Fixed issue where unittest.TestCase.setUpClass() is not
    called when a test has / in its name since pytest 6.2.0.

    This refers to the path part in pytest node IDs, e.g.
    TestClass::test_it in the node ID
    tests/test_file.py::TestClass::test_it.

    Now, instead of assuming that the test name does not contain
    /, it is assumed that test path does not contain ::. We plan
    to hopefully make both of these work in the future.

    #8803: It is now possible to add colors to custom log levels
    on cli log.

    By using add_color_level from a pytest_configure hook, colors
    can be added:

    logging_plugin = config.pluginmanager.get_plugin('logging-plugin')
    logging_plugin.log_cli_handler.formatter.add_color_level(logging.INFO,
    'cyan')
    logging_plugin.log_cli_handler.formatter.add_color_level(logging.SPAM,
    'blue')

    See Customizing Colors for more information.

    #8822: When showing fixture paths in --fixtures or --fixtures-by-test,
    fixtures coming from pytest itself now display an elided path,
    rather than the full path to the file in the site-packages
    directory.

    #8898: Complex numbers are now treated like floats and integers
    when generating parameterization IDs.

    #9062: --stepwise-skip now implicitly enables --stepwise and
    can be used on its own.

    #9205: pytest.Cache.set() now preserves key order when saving
    dicts.
@
text
@d1 1
a1 1
@@comment $NetBSD$
d4 7
d13 1
d16 1
d19 1
d22 1
d25 1
d28 1
d31 1
d34 1
d37 1
d40 1
d43 1
d46 1
d49 1
d52 1
d55 1
d58 1
d61 1
d64 1
d67 1
d70 1
d73 1
d76 1
d79 1
d82 1
d85 1
d88 1
d91 1
d94 1
d97 1
d100 1
d103 1
d106 1
d109 1
d112 1
d115 1
d118 1
d121 1
d124 1
d127 1
d130 1
d133 1
d136 1
d139 1
d143 1
d146 1
d149 1
d152 1
d155 1
d158 1
d161 1
d164 1
d167 1
d170 1
d173 1
d176 1
d179 1
d182 1
d185 1
d188 1
d191 1
d194 1
d197 1
d200 1
d203 1
d206 1
a206 9
${PYSITELIB}/${WHEEL_INFODIR}/INSTALLER
${PYSITELIB}/${WHEEL_INFODIR}/LICENSE
${PYSITELIB}/${WHEEL_INFODIR}/METADATA
${PYSITELIB}/${WHEEL_INFODIR}/RECORD
${PYSITELIB}/${WHEEL_INFODIR}/REQUESTED
${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
${PYSITELIB}/${WHEEL_INFODIR}/direct_url.json
${PYSITELIB}/${WHEEL_INFODIR}/entry_points.txt
${PYSITELIB}/${WHEEL_INFODIR}/top_level.txt
d209 1
d212 1
a212 2
${PYSITELIB}/pytest/collect.py
${PYSITELIB}/pytest/collect.pyc
@


1.20
log
@py-test: updated to 6.2.0

pytest 6.2.0 (2020-12-12)
=========================

Breaking Changes
----------------
- pytest now supports python3.6+ only.


Deprecations
------------
- Directly constructing/calling the following classes/functions is now deprecated:
  - ``_pytest.cacheprovider.Cache``
  - ``_pytest.cacheprovider.Cache.for_config()``
  - ``_pytest.cacheprovider.Cache.clear_cache()``
  - ``_pytest.cacheprovider.Cache.cache_dir_from_config()``
  - ``_pytest.capture.CaptureFixture``
  - ``_pytest.fixtures.FixtureRequest``
  - ``_pytest.fixtures.SubRequest``
  - ``_pytest.logging.LogCaptureFixture``
  - ``_pytest.pytester.Pytester``
  - ``_pytest.pytester.Testdir``
  - ``_pytest.recwarn.WarningsRecorder``
  - ``_pytest.recwarn.WarningsChecker``
  - ``_pytest.tmpdir.TempPathFactory``
  - ``_pytest.tmpdir.TempdirFactory``

  These have always been considered private, but now issue a deprecation warning, which may become a hard error in pytest 7.0.0.

- The ``--strict`` command-line option has been deprecated, use ``--strict-markers`` instead.

  We have plans to maybe in the future to reintroduce ``--strict`` and make it an encompassing flag for all strictness
  related options (``--strict-markers`` and ``--strict-config`` at the moment, more might be introduced in the future).

- The ``@@pytest.yield_fixture`` decorator/function is now deprecated. Use :func:`pytest.fixture` instead.

  ``yield_fixture`` has been an alias for ``fixture`` for a very long time, so can be search/replaced safely.


Features
--------
- pytest now warns about unraisable exceptions and unhandled thread exceptions that occur in tests on Python>=3.8.
  See :ref:`unraisable` for more information.
- New :fixture:`pytester` fixture, which is identical to :fixture:`testdir` but its methods return :class:`pathlib.Path` when appropriate instead of ``py.path.local``.

  This is part of the movement to use :class:`pathlib.Path` objects internally, in order to remove the dependency to ``py`` in the future.

  Internally, the old :class:`Testdir <_pytest.pytester.Testdir>` is now a thin wrapper around :class:`Pytester <_pytest.pytester.Pytester>`, preserving the old interface.

- A new hook was added, `pytest_markeval_namespace` which should return a dictionary.
  This dictionary will be used to augment the "global" variables available to evaluate skipif/xfail/xpass markers.

  Pseudo example

  ``conftest.py``:

  .. code-block:: python

     def pytest_markeval_namespace():
         return {"color": "red"}

  ``test_func.py``:

  .. code-block:: python

     @@pytest.mark.skipif("color == 'blue'", reason="Color is not red")
     def test_func():
         assert False

- It is now possible to construct a :class:`~pytest.MonkeyPatch` object directly as ``pytest.MonkeyPatch()``,
  in cases when the :fixture:`monkeypatch` fixture cannot be used. Previously some users imported it
  from the private `_pytest.monkeypatch.MonkeyPatch` namespace.

  Additionally, :meth:`MonkeyPatch.context <pytest.MonkeyPatch.context>` is now a classmethod,
  and can be used as ``with MonkeyPatch.context() as mp: ...``. This is the recommended way to use
  ``MonkeyPatch`` directly, since unlike the ``monkeypatch`` fixture, an instance created directly
  is not ``undo()``-ed automatically.


Improvements
------------
- Added an ``__str__`` implementation to the :class:`~pytest.pytester.LineMatcher` class which is returned from ``pytester.run_pytest().stdout`` and similar. It returns the entire output, like the existing ``str()`` method.
- Verbose mode now shows the reason that a test was skipped in the test's terminal line after the "SKIPPED", "XFAIL" or "XPASS".
- The types of builtin pytest fixtures are now exported so they may be used in type annotations of test functions.
  The newly-exported types are:
  - ``pytest.FixtureRequest`` for the :fixture:`request` fixture.
  - ``pytest.Cache`` for the :fixture:`cache` fixture.
  - ``pytest.CaptureFixture[str]`` for the :fixture:`capfd` and :fixture:`capsys` fixtures.
  - ``pytest.CaptureFixture[bytes]`` for the :fixture:`capfdbinary` and :fixture:`capsysbinary` fixtures.
  - ``pytest.LogCaptureFixture`` for the :fixture:`caplog` fixture.
  - ``pytest.Pytester`` for the :fixture:`pytester` fixture.
  - ``pytest.Testdir`` for the :fixture:`testdir` fixture.
  - ``pytest.TempdirFactory`` for the :fixture:`tmpdir_factory` fixture.
  - ``pytest.TempPathFactory`` for the :fixture:`tmp_path_factory` fixture.
  - ``pytest.MonkeyPatch`` for the :fixture:`monkeypatch` fixture.
  - ``pytest.WarningsRecorder`` for the :fixture:`recwarn` fixture.

  Constructing them is not supported (except for `MonkeyPatch`); they are only meant for use in type annotations.
  Doing so will emit a deprecation warning, and may become a hard-error in pytest 7.0.

  Subclassing them is also not supported. This is not currently enforced at runtime, but is detected by type-checkers such as mypy.

- When a comparison between :func:`namedtuple <collections.namedtuple>` instances of the same type fails, pytest now shows the differing field names (possibly nested) instead of their indexes.
- :meth:`Node.warn <_pytest.nodes.Node.warn>` now permits any subclass of :class:`Warning`, not just :class:`PytestWarning <pytest.PytestWarning>`.
- Improved reporting when using ``--collected-only``. It will now show the number of collected tests in the summary stats.
- Use strict equality comparison for non-numeric types in :func:`pytest.approx` instead of
  raising :class:`TypeError`.

  This was the undocumented behavior before 3.7, but is now officially a supported feature.

- New ``--sw-skip`` argument which is a shorthand for ``--stepwise-skip``.
- Added ``'node_modules'`` to default value for :confval:`norecursedirs`.
- :meth:`doClassCleanups <unittest.TestCase.doClassCleanups>` (introduced in :mod:`unittest` in Python and 3.8) is now called appropriately.


Bug Fixes
---------
- Fixed quadratic behavior and improved performance of collection of items using autouse fixtures and xunit fixtures.
- Fixed an issue where some files in packages are getting lost from ``--lf`` even though they contain tests that failed. Regressed in pytest 5.4.0.
-  Directories created by by :fixture:`tmp_path` and :fixture:`tmpdir` are now considered stale after 3 days without modification (previous value was 3 hours) to avoid deleting directories still in use in long running test suites.
-  Fixed a crash or hang in :meth:`pytester.spawn <_pytest.pytester.Pytester.spawn>` when the :mod:`readline` module is involved.
- Fixed handling of recursive symlinks when collecting tests.
- Fixed symlinked directories not being followed during collection. Regressed in pytest 6.1.0.
- Fixed only one doctest being collected when using ``pytest --doctest-modules path/to/an/__init__.py``.


Improved Documentation
----------------------
- Add more information and use cases about skipping doctests.
- Classes which should not be inherited from are now marked ``final class`` in the API reference.
- ``_pytest.config.argparsing.Parser.addini()`` accepts explicit ``None`` and ``"string"``.
- In pull request section, ask to commit after editing changelog and authors file.


Trivial/Internal Changes
------------------------
- The ``attrs`` dependency requirement is now >=19.2.0 instead of >=17.4.0.
- `.pyc` files created by pytest's assertion rewriting now conform to the newer PEP-552 format on Python>=3.7.
  (These files are internal and only interpreted by pytest itself.)
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.19 2020/10/22 09:45:20 adam Exp $
a3 7
${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
${PYSITELIB}/${EGG_INFODIR}/entry_points.txt
${PYSITELIB}/${EGG_INFODIR}/not-zip-safe
${PYSITELIB}/${EGG_INFODIR}/requires.txt
${PYSITELIB}/${EGG_INFODIR}/top_level.txt
a5 1
${PYSITELIB}/_pytest/__init__.pyo
a7 1
${PYSITELIB}/_pytest/_argcomplete.pyo
a9 1
${PYSITELIB}/_pytest/_code/__init__.pyo
a11 1
${PYSITELIB}/_pytest/_code/code.pyo
a13 1
${PYSITELIB}/_pytest/_code/source.pyo
a15 1
${PYSITELIB}/_pytest/_io/__init__.pyo
a17 1
${PYSITELIB}/_pytest/_io/saferepr.pyo
a19 1
${PYSITELIB}/_pytest/_io/terminalwriter.pyo
a21 1
${PYSITELIB}/_pytest/_io/wcwidth.pyo
a23 1
${PYSITELIB}/_pytest/_version.pyo
a25 1
${PYSITELIB}/_pytest/assertion/__init__.pyo
a27 1
${PYSITELIB}/_pytest/assertion/rewrite.pyo
a29 1
${PYSITELIB}/_pytest/assertion/truncate.pyo
a31 1
${PYSITELIB}/_pytest/assertion/util.pyo
a33 1
${PYSITELIB}/_pytest/cacheprovider.pyo
a35 1
${PYSITELIB}/_pytest/capture.pyo
a37 1
${PYSITELIB}/_pytest/compat.pyo
a39 1
${PYSITELIB}/_pytest/config/__init__.pyo
d42 2
a43 1
${PYSITELIB}/_pytest/config/argparsing.pyo
a45 1
${PYSITELIB}/_pytest/config/exceptions.pyo
a47 1
${PYSITELIB}/_pytest/config/findpaths.pyo
a49 1
${PYSITELIB}/_pytest/debugging.pyo
a51 1
${PYSITELIB}/_pytest/deprecated.pyo
a53 1
${PYSITELIB}/_pytest/doctest.pyo
a55 1
${PYSITELIB}/_pytest/faulthandler.pyo
a57 1
${PYSITELIB}/_pytest/fixtures.pyo
a59 1
${PYSITELIB}/_pytest/freeze_support.pyo
a61 1
${PYSITELIB}/_pytest/helpconfig.pyo
a63 1
${PYSITELIB}/_pytest/hookspec.pyo
d66 2
a67 1
${PYSITELIB}/_pytest/junitxml.pyo
a69 1
${PYSITELIB}/_pytest/logging.pyo
a71 1
${PYSITELIB}/_pytest/main.pyo
a73 1
${PYSITELIB}/_pytest/mark/__init__.pyo
a75 1
${PYSITELIB}/_pytest/mark/expression.pyo
a77 1
${PYSITELIB}/_pytest/mark/structures.pyo
a79 1
${PYSITELIB}/_pytest/monkeypatch.pyo
a81 1
${PYSITELIB}/_pytest/nodes.pyo
a83 1
${PYSITELIB}/_pytest/nose.pyo
a85 1
${PYSITELIB}/_pytest/outcomes.pyo
a87 1
${PYSITELIB}/_pytest/pastebin.pyo
a89 1
${PYSITELIB}/_pytest/pathlib.pyo
a92 1
${PYSITELIB}/_pytest/pytester.pyo
a94 1
${PYSITELIB}/_pytest/pytester_assertions.pyo
a96 1
${PYSITELIB}/_pytest/python.pyo
d99 2
a100 1
${PYSITELIB}/_pytest/python_api.pyo
a102 1
${PYSITELIB}/_pytest/recwarn.pyo
a104 1
${PYSITELIB}/_pytest/reports.pyo
d107 2
a108 1
${PYSITELIB}/_pytest/runner.pyo
a110 1
${PYSITELIB}/_pytest/setuponly.pyo
a112 1
${PYSITELIB}/_pytest/setupplan.pyo
d115 2
a116 1
${PYSITELIB}/_pytest/skipping.pyo
a118 4
${PYSITELIB}/_pytest/stepwise.pyo
${PYSITELIB}/_pytest/store.py
${PYSITELIB}/_pytest/store.pyc
${PYSITELIB}/_pytest/store.pyo
a120 1
${PYSITELIB}/_pytest/terminal.pyo
a122 1
${PYSITELIB}/_pytest/threadexception.pyo
a124 1
${PYSITELIB}/_pytest/timing.pyo
a126 1
${PYSITELIB}/_pytest/tmpdir.pyo
a128 1
${PYSITELIB}/_pytest/unittest.pyo
a130 1
${PYSITELIB}/_pytest/unraisableexception.pyo
a132 1
${PYSITELIB}/_pytest/warning_types.pyo
d135 9
a143 1
${PYSITELIB}/_pytest/warnings.pyo
a145 1
${PYSITELIB}/pytest/__init__.pyo
a147 1
${PYSITELIB}/pytest/__main__.pyo
a149 1
${PYSITELIB}/pytest/collect.pyo
@


1.19
log
@py-test: updated to 6.1.1

pytest 6.1.1 (2020-10-03)
=========================

Bug Fixes
---------
- Fixed regression in pytest 6.1.0 causing incorrect rootdir to be determined in some non-trivial cases where parent directories have config files as well.
- Fixed crash in header reporting when :confval:`testpaths` is used and contains absolute paths (regression in 6.1.0).


pytest 6.1.0 (2020-09-26)
=========================

Breaking Changes
----------------

- As per our policy, the following features which have been deprecated in the 5.X series are now
  removed:
  * The ``funcargnames`` read-only property of ``FixtureRequest``, ``Metafunc``, and ``Function`` classes. Use ``fixturenames`` attribute.
  * ``@@pytest.fixture`` no longer supports positional arguments, pass all arguments by keyword instead.
  * Direct construction of ``Node`` subclasses now raise an error, use ``from_parent`` instead.
  * The default value for ``junit_family`` has changed to ``xunit2``. If you require the old format, add ``junit_family=xunit1`` to your configuration file.
  * The ``TerminalReporter`` no longer has a ``writer`` attribute. Plugin authors may use the public functions of the ``TerminalReporter`` instead of accessing the ``TerminalWriter`` object directly.
  * The ``--result-log`` option has been removed. Users are recommended to use the `pytest-reportlog <https://github.com/pytest-dev/pytest-reportlog>`__ plugin instead.

  For more information consult
  `Deprecations and Removals <https://docs.pytest.org/en/stable/deprecations.html>`__ in the docs.


Deprecations
------------
- The ``pytest.collect`` module is deprecated: all its names can be imported from ``pytest`` directly.
- The ``pytest._fillfuncargs`` function is deprecated. This function was kept
  for backward compatibility with an older plugin.

  It's functionality is not meant to be used directly, but if you must replace
  it, use `function._request._fillfixtures()` instead, though note this is not
  a public API and may break in the future.

- The special ``-k '-expr'`` syntax to ``-k`` is deprecated. Use ``-k 'not expr'``
  instead.

  The special ``-k 'expr:'`` syntax to ``-k`` is deprecated. Please open an issue
  if you use this and want a replacement.

- The :func:`pytest_warning_captured <_pytest.hookspec.pytest_warning_captured>` hook is deprecated in favor
  of :func:`pytest_warning_recorded <_pytest.hookspec.pytest_warning_recorded>`, and will be removed in a future version.
- The ``gethookproxy()`` and ``isinitpath()`` methods of ``FSCollector`` and ``Package`` are deprecated;
  use ``self.session.gethookproxy()`` and ``self.session.isinitpath()`` instead.
  This should work on all pytest versions.


Features
--------
- New ``--durations-min`` command-line flag controls the minimal duration for inclusion in the slowest list of tests shown by ``--durations``. Previously this was hard-coded to ``0.005s``.


Improvements
------------
- Internal pytest warnings issued during the early stages of initialization are now properly handled and can filtered through :confval:`filterwarnings` or ``--pythonwarnings/-W``.
- When a plugin listed in ``required_plugins`` is missing or an unknown config key is used with ``--strict-config``, a simple error message is now shown instead of a stacktrace.
-  Added two new attributes :attr:`rootpath <_pytest.config.Config.rootpath>` and :attr:`inipath <_pytest.config.Config.inipath>` to :class:`Config <_pytest.config.Config>`.
  These attributes are :class:`pathlib.Path` versions of the existing :attr:`rootdir <_pytest.config.Config.rootdir>` and :attr:`inifile <_pytest.config.Config.inifile>` attributes,
  and should be preferred over them when possible.

- Public classes which are not designed to be inherited from are now marked `@@final <https://docs.python.org/3/library/typing.html#typing.final>`_.
  Code which inherits from these classes will trigger a type-checking (e.g. mypy) error, but will still work in runtime.
  Currently the ``final`` designation does not appear in the API Reference but hopefully will in the future.


Bug Fixes
---------
- Fixed error when overwriting a parametrized fixture, while also reusing the super fixture value.

  .. code-block:: python

      # conftest.py
      import pytest


      @@pytest.fixture(params=[1, 2])
      def foo(request):
          return request.param


      # test_foo.py
      import pytest


      @@pytest.fixture
      def foo(foo):
          return foo * 2


- Fixed an internal error crash with ``IndexError: list index out of range`` when
  collecting a module which starts with a decorated function, the decorator
  raises, and assertion rewriting is enabled.
- pylint shouldn't complain anymore about unimplemented abstract methods when inheriting from :ref:`File <non-python tests>`.
- Fixed test collection when a full path without a drive letter was passed to pytest on Windows (for example ``\projects\tests\test.py`` instead of ``c:\projects\tests\pytest.py``).
- Fix handling of command-line options that appear as paths but trigger an OS-level syntax error on Windows, such as the options used internally by ``pytest-xdist``.
- Fixed INTERNALERROR when accessing locals / globals with faulty ``exec``.


Improved Documentation
----------------------
- Removed faq.rst and its reference in contents.rst.


Trivial/Internal Changes
------------------------
- The internal ``junitxml`` plugin has rewritten to use ``xml.etree.ElementTree``.
  The order of attributes in XML elements might differ. Some unneeded escaping is
  no longer performed.
- The dependency on the ``more-itertools`` package has been removed.
- The result type of :meth:`capfd.readouterr() <_pytest.capture.CaptureFixture.readouterr>` (and similar) is no longer a namedtuple,
  but should behave like one in all respects. This was done for technical reasons.
- When collecting tests, pytest finds test classes and functions by examining the
  attributes of python objects (modules, classes and instances). To speed up this
  process, pytest now ignores builtin attributes (like ``__class__``,
  ``__delattr__`` and ``__new__``) without consulting the :confval:`python_classes` and
  :confval:`python_functions` configuration options and without passing them to plugins
  using the :func:`pytest_pycollect_makeitem <_pytest.hookspec.pytest_pycollect_makeitem>` hook.
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.18 2020/08/05 14:09:30 adam Exp $
d138 3
d174 3
d186 3
@


1.18
log
@py-test: updated to 6.0.1

pytest 6.0.1

Bug Fixes
* Passing an empty help value to Parser.add_option is now accepted instead of crashing when running pytest --help. Passing None raises a more informative TypeError.
* Fix pylint not-callable lint on pytest.mark.parametrize() and the other builtin marks: skip, skipif, xfail, usefixtures, filterwarnings.
* Fix regression in plugins using TestReport.longreprtext (such as pytest-html) when TestReport.longrepr is not a string.
* Fix logging capture handler's level not reset on teardown after a call to caplog.set_level().


pytest 6.0.0

(Please see the full set of changes for this release also in the 6.0.0rc1 notes below)

Breaking Changes

* PytestDeprecationWarning are now errors by default.

Following our plan to remove deprecated features with as little disruption as possible, all warnings of type PytestDeprecationWarning now generate errors instead of warning messages.

The affected features will be effectively removed in pytest 6.1, so please consult the Deprecations and Removals section in the docs for directions on how to update existing code.

In the pytest 6.0.X series, it is possible to change the errors back into warnings as a stopgap measure by adding this to your pytest.ini file:

[pytest]
filterwarnings =
    ignore::pytest.PytestDeprecationWarning
But this will stop working when pytest 6.1 is released.

* The exec_() and is_true() methods of _pytest._code.Frame have been removed.

Features
* Added support for :envvar:`NO_COLOR` and :envvar:`FORCE_COLOR` environment variables to control colored output.

Improvements
* --log-file CLI option and log_file ini marker now create subdirectories if needed.
* The :func:`pytest.raises` function has a clearer error message when match equals the obtained string but is not a regex match. In this case it is suggested to escape the regex.
Bug Fixes

* Fix the reported location of tests skipped with @@pytest.mark.skip when --runxfail is used.
* :fixture:`tmpdir` and :fixture:`tmp_path` no longer raise an error if the lock to check for stale temporary directories is not accessible.
* Preserve line endings when captured via capfd.
* Restored the previous formatting of TracebackEntry.__str__ which was changed by accident.

Improved Documentation
* Clarified when the usefixtures mark can apply fixtures to test.
* Add a note about -q option used in getting started guide.

Trivial/Internal Changes
* Fixture scope package is no longer considered experimental.


pytest 6.0.0rc1

Breaking Changes

* TestReport.longrepr is now always an instance of ReprExceptionInfo. Previously it was a str when a test failed with pytest.fail(..., pytrace=False).

* symlinks are no longer resolved during collection and matching conftest.py files with test file paths.

Resolving symlinks for the current directory and during collection was introduced as a bugfix in 3.9.0, but it actually is a new feature which had unfortunate consequences in Windows and surprising results in other platforms.

This might break test suites which made use of this feature; the fix is to create a symlink for the entire test tree, and not only to partial files/tress as it was possible previously.

* Testdir.run().parseoutcomes() now always returns the parsed nouns in plural form.

Originally parseoutcomes() would always returns the nouns in plural form, but a change meant to improve the terminal summary by using singular form single items (1 warning or 1 error) caused an unintended regression by changing the keys returned by parseoutcomes().

Now the API guarantees to always return the plural form, so calls like this:

result = testdir.runpytest()
result.assert_outcomes(error=1)
Need to be changed to:

result = testdir.runpytest()
result.assert_outcomes(errors=1)
* The os.dup() function is now assumed to exist. We are not aware of any supported Python 3 implementations which do not provide it.

* -k no longer matches against the names of the directories outside the test session root.

Also, pytest.Package.name is now just the name of the directory containing the package's __init__.py file, instead of the full path. This is consistent with how the other nodes are named, and also one of the reasons why -k would match against any directory containing the test suite.

* Expressions given to the -m and -k options are no longer evaluated using Python's :func:`eval`. The format supports or, and, not, parenthesis and general identifiers to match against. Python constants, keywords or other operators are no longer evaluated differently.

* Pytest now uses its own TerminalWriter class instead of using the one from the py library. Plugins generally access this class through TerminalReporter.writer, TerminalReporter.write() (and similar methods), or _pytest.config.create_terminal_writer().

The following breaking changes were made:

Output (write() method and others) no longer flush implicitly; the flushing behavior of the underlying file is respected. To flush explicitly (for example, if you want output to be shown before an end-of-line is printed), use write(flush=True) or terminal_writer.flush().
Explicit Windows console support was removed, delegated to the colorama library.
Support for writing bytes was removed.
The reline method and chars_on_current_line property were removed.
The stringio and encoding arguments was removed.
Support for passing a callable instead of a file was removed.
* The item.catch_log_handler and item.catch_log_handlers attributes, set by the logging plugin and never meant to be public, are no longer available.

The deprecated --no-print-logs option and log_print ini option are removed. Use --show-capture instead.

* Removed the unused args parameter from pytest.Function.__init__.

* Removed the pytest_doctest_prepare_content hook specification. This hook hasn't been triggered by pytest for at least 10 years.

* Some changes were made to the internal _pytest._code.source, listed here for the benefit of plugin authors who may be using it:

The deindent argument to Source() has been removed, now it is always true.
Support for zero or multiple arguments to Source() has been removed.
Support for comparing Source with an str has been removed.
The methods Source.isparseable() and Source.putaround() have been removed.
The method Source.compile() and function _pytest._code.compile() have been removed; use plain compile() instead.
The function _pytest._code.source.getsource() has been removed; use Source() directly instead.

Deprecations
* The special -k '-expr' syntax to -k is deprecated. Use -k 'not expr' instead.
The special -k 'expr:' syntax to -k is deprecated. Please open an issue if you use this and want a replacement.
* pytest_warning_captured is deprecated in favor of the pytest_warning_recorded hook.

Features
* pytest now supports pyproject.toml files for configuration.

The configuration options is similar to the one available in other formats, but must be defined in a [tool.pytest.ini_options] table to be picked up by pytest:

# pyproject.toml
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q"
testpaths = [
    "tests",
    "integration",
]
More information can be found in the docs.

* pytest now includes inline type annotations and exposes them to user programs. Most of the user-facing API is covered, as well as internal code.

If you are running a type checker such as mypy on your tests, you may start noticing type errors indicating incorrect usage. If you run into an error that you believe to be incorrect, please let us know in an issue.

The types were developed against mypy version 0.780. Versions before 0.750 are known not to work. We recommend using the latest version. Other type checkers may work as well, but they are not officially verified to work by pytest yet.

* Introduced a new hook named pytest_warning_recorded to convey information about warnings captured by the internal pytest warnings plugin.

This hook is meant to replace pytest_warning_captured, which is deprecated and will be removed in a future release.

* New command-line flags:

--no-header: disables the initial header, including platform, version, and plugins.
--no-summary: disables the final test summary, including warnings.
* A warning is now shown when an unknown key is read from a config INI file.

The --strict-config flag has been added to treat these warnings as errors.

* Added --code-highlight command line option to enable/disable code highlighting in terminal output.
* New --import-mode=importlib option that uses importlib to import test modules.

Traditionally pytest used __import__ while changing sys.path to import test modules (which also changes sys.modules as a side-effect), which works but has a number of drawbacks, like requiring test modules that don't live in packages to have unique names (as they need to reside under a unique name in sys.modules).

--import-mode=importlib uses more fine grained import mechanisms from importlib which don't require pytest to change sys.path or sys.modules at all, eliminating much of the drawbacks of the previous mode.

You can read more about this option in the documentation.
* New required_plugins configuration option allows the user to specify a list of plugins, including version information, that are required for pytest to run. An error is raised if any required plugins are not found when running pytest.

Improvements
* The pytest command now suppresses the BrokenPipeError error message that is printed to stderr when the output of pytest is piped and and the pipe is closed by the piped-to program (common examples are less and head).
* Improved precision of test durations measurement. CallInfo items now have a new <CallInfo>.duration attribute, created using time.perf_counter(). This attribute is used to fill the <TestReport>.duration attribute, which is more accurate than the previous <CallInfo>.stop - <CallInfo>.start (as these are based on time.time()).
* Rich comparison for dataclasses and attrs-classes is now recursive.
* Exposed the pytest.FixtureLookupError exception which is raised by request.getfixturevalue() (where request is a FixtureRequest fixture) when a fixture with the given name cannot be returned.
* If an error is encountered while formatting the message in a logging call, for example logging.warning("oh no!: %s: %s", "first") (a second argument is missing), pytest now propagates the error, likely causing the test to fail.
Previously, such a mistake would cause an error to be printed to stderr, which is not displayed by default for passing tests. This change makes the mistake visible during testing.
You may supress this behavior temporarily or permanently by setting logging.raiseExceptions = False.
* Explicit new-lines in help texts of command-line options are preserved, allowing plugins better control of the help displayed to users.
* When using the --duration option, the terminal message output is now more precise about the number and duration of hidden items.
* Collected files are displayed after any reports from hooks, e.g. the status from --lf.
* When fd capturing is used, through --capture=fd or the capfd and capfdbinary fixtures, and the file descriptor (0, 1, 2) cannot be duplicated, FD capturing is still performed. Previously, direct writes to the file descriptors would fail or be lost in this case.
* Exit with an error if the --basetemp argument is empty, is the current working directory or is one of the parent directories. This is done to protect against accidental data loss, as any directory passed to this argument is cleared.
* pytest --version now displays just the pytest version, while pytest --version --version displays more verbose information including plugins. This is more consistent with how other tools show --version.
* :meth:`caplog.set_level() <_pytest.logging.LogCaptureFixture.set_level>` will now override any :confval:`log_level` set via the CLI or configuration file.
* :meth:`caplog.set_level() <_pytest.logging.LogCaptureFixture.set_level>` and :meth:`caplog.at_level() <_pytest.logging.LogCaptureFixture.at_level>` no longer affect the level of logs that are shown in the Captured log report report section.
* Improve recursive diff report for comparison asserts on dataclasses / attrs.
* --junitxml now includes the exception cause in the message XML attribute for failures during setup and teardown.

Previously:
<error message="test setup failure">
Now:
<error message="failed on setup with &quot;ValueError: Some error during setup&quot;">

Bug Fixes
* Fix issue where directories from :fixture:`tmpdir` are not removed properly when multiple instances of pytest are running in parallel.
* Prevent crashing and provide a user-friendly error when a marker expression (-m) invoking of :func:`eval` raises any exception.
* The path shown in the summary report for SKIPPED tests is now always relative. Previously it was sometimes absolute.
* Fix a possible race condition when trying to remove lock files used to control access to folders created by :fixture:`tmp_path` and :fixture:`tmpdir`.
* Fixes an issue where logging during collection step caused duplication of log messages to stderr.
* Paths appearing in error messages are now correct in case the current working directory has changed since the start of the session.
* Support deleting paths longer than 260 characters on windows created inside :fixture:`tmpdir`.
* Fix crash with captured output when using :fixture:`capsysbinary`.
* Revert the change introduced by 6330, which required all arguments to @@pytest.mark.parametrize to be explicitly defined in the function signature.

The intention of the original change was to remove what was expected to be an unintended/surprising behavior, but it turns out many people relied on it, so the restriction has been reverted.

* Fix crash when plugins return an unknown stats while using the --reportlog option.
* Ensure a unittest.IsolatedAsyncioTestCase is actually awaited.
* Fix TerminalRepr instances to be hashable again.
* Fix regression where functions registered with :meth:`unittest.TestCase.addCleanup` were not being called on test failures.
* Allow users to still set the deprecated TerminalReporter.writer attribute.
* Prevent pytest from printing ConftestImportFailure traceback to stdout.
* Fix regressions with --lf filtering too much since pytest 5.4.
* Revert "tmpdir: clean up indirection via config for factories" 6767 as it breaks pytest-xdist.
* When a yielding fixture fails to yield a value, report a test setup error instead of crashing.
* The path of file skipped by @@pytest.mark.skip in the SKIPPED report is now relative to invocation directory. Previously it was relative to root directory.
* Fixed regression: asyncbase.TestCase tests are executed correctly again.
* --setup-show now doesn't raise an error when a bytes value is used as a parametrize parameter when Python is called with the -bb flag.
* Fix :meth:`pytest.File.from_parent` so it forwards extra keyword arguments to the constructor.
* Classes with broken __getattribute__ methods are displayed correctly during failures.
* Prevent hiding the underlying exception when ConfTestImportFailure is raised.
* Fix _is_setup_py for files encoded differently than locale.
* Fix regression where running with --pdb would call :meth:`unittest.TestCase.tearDown` for skipped tests.
* When using pytest.fixture on a function directly, as in pytest.fixture(func), if the autouse or params arguments are also passed, the function is no longer ignored, but is marked as a fixture.
* Fix possibly incorrect evaluation of string expressions passed to pytest.mark.skipif and pytest.mark.xfail, in rare circumstances where the exact same string is used but refers to different global values.
* Fixed exception causes all over the codebase, i.e. use raise new_exception from old_exception when wrapping an exception.

Improved Documentation
* The development guide now links to the contributing section of the docs and RELEASING.rst on GitHub.
* Add a note about --strict and --strict-markers and the preference for the latter one.
* Explain indirect parametrization and markers for fixtures.

Trivial/Internal Changes
* The originalname attribute of _pytest.python.Function now defaults to name if not provided explicitly, and is always set.
* The dependency on the wcwidth package has been removed.
* Replaced py.iniconfig with iniconfig.
* src/_pytest/config/__init__.py now uses the warnings module to report warnings instead of sys.stderr.write.
* Remove last internal uses of deprecated slave term from old pytest-xdist.
* py>=1.8.2 is now required.
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.17 2020/05/16 08:00:01 adam Exp $
a149 3
${PYSITELIB}/_pytest/resultlog.py
${PYSITELIB}/_pytest/resultlog.pyc
${PYSITELIB}/_pytest/resultlog.pyo
@


1.17
log
@py-test: updated to 5.4.2

pytest 5.4.2:
Bug Fixes
* Fix crash with captured output when using the capsysbinary fixture.
* Ensure a unittest.IsolatedAsyncioTestCase is actually awaited.
* Fix TerminalRepr instances to be hashable again.
* Fix regression where functions registered with TestCase.addCleanup were not being called on test failures.
* Allow users to still set the deprecated TerminalReporter.writer attribute.
* Revert “tmpdir: clean up indirection via config for factories” 6767 as it breaks pytest-xdist.
* Fixed regression: asyncbase.TestCase tests are executed correctly again.
* Fix File.from_constructor so it forwards extra keyword arguments to the constructor.
* Classes with broken __getattribute__ methods are displayed correctly during failures.
* Fix _is_setup_py for files encoded differently than locale.

pytest 5.4.1:
Bug Fixes
* Revert the change introduced by 6330, which required all arguments to @@pytest.mark.parametrize to be explicitly defined in the function signature.
The intention of the original change was to remove what was expected to be an unintended/surprising behavior, but it turns out many people relied on it, so the restriction has been reverted.
* Fix crash when plugins return an unknown stats while using the --reportlog option.

pytest 5.4.0:
Breaking Changes
* Matching of -k EXPRESSION to test names is now case-insensitive.
* Plugins specified with -p are now loaded after internal plugins, which results in their hooks being called before the internal ones.
This makes the -p behavior consistent with PYTEST_PLUGINS.
* Removed the long-deprecated pytest_itemstart hook.
This hook has been marked as deprecated and not been even called by pytest for over 10 years now.
* Reversed / fix meaning of “+/-” in error diffs. “-” means that sth. expected is missing in the result and “+” means that there are unexpected extras in the result.
* The cached_result attribute of FixtureDef is now set to None when the result is unavailable, instead of being deleted.
If your plugin performs checks like hasattr(fixturedef, 'cached_result'), for example in a pytest_fixture_post_finalizer hook implementation, replace it with fixturedef.cached_result is not None. If you del the attribute, set it to None instead.

Deprecations
* Option --no-print-logs is deprecated and meant to be removed in a future release. If you use --no-print-logs, please try out --show-capture and provide feedback.
--show-capture command-line option was added in pytest 3.5.0 and allows to specify how to display captured output when tests fail: no, stdout, stderr, log or all (the default).
* Deprecate the unused/broken pytest_collect_directory hook. It was misaligned since the removal of the Directory collector in 2010 and incorrect/unusable as soon as collection was split from test execution.
* Deprecate using direct constructors for Nodes.
Instead they are now constructed via Node.from_parent.
This transitional mechanism enables us to untangle the very intensely entangled Node relationships by enforcing more controlled creation/configuration patterns.
As part of this change, session/config are already disallowed parameters and as we work on the details we might need disallow a few more as well.
Subclasses are expected to use super().from_parent if they intend to expand the creation of Nodes.
* The TerminalReporter.writer attribute has been deprecated and should no longer be used. This was inadvertently exposed as part of the public API of that plugin and ties it too much with py.io.TerminalWriter.

Features
* New –capture=tee-sys option to allow both live printing and capturing of test output.
* Now all arguments to @@pytest.mark.parametrize need to be explicitly declared in the function signature or via indirect. Previously it was possible to omit an argument if a fixture with the same name existed, which was just an accident of implementation and was not meant to be a part of the API.
* Changed default for -r to fE, which displays failures and errors in the short test summary. -rN can be used to disable it (the old behavior).
* New options have been added to the junit_logging option: log, out-err, and all.
* Excess warning summaries are now collapsed per file to ensure readable display of warning summaries.

Improvements
* pytest.mark.parametrize accepts integers for ids again, converting it to strings.
* Use “yellow” main color with any XPASSED tests.
* Revert “A warning is now issued when assertions are made for None”.
The warning proved to be less useful than initially expected and had quite a few false positive cases.
* tmpdir_factory.mktemp now fails when given absolute and non-normalized paths.
* The pytest_warning_captured hook now receives a location parameter with the code location that generated the warning.
* pytester: the testdir fixture respects environment settings from the monkeypatch fixture for inner runs.
* --fulltrace is honored with collection errors.
* Make --showlocals work also with --tb=short.
* Add support for matching lines consecutively with LineMatcher’s fnmatch_lines() and re_match_lines().
* Code is now highlighted in tracebacks when pygments is installed.
Users are encouraged to install pygments into their environment and provide feedback, because the plan is to make pygments a regular dependency in the future.
* Import usage error message with invalid -o option.
* pytest.mark.parametrize supports iterators and generators for ids.

Bug Fixes
* Add support for calling pytest.xfail() and pytest.importorskip() with doctests.
* --trace now works with unittests.
* Fixed some warning reports produced by pytest to point to the correct location of the warning in the user’s code.
* Fix --last-failed to collect new tests from files with known failures.
* Report PytestUnknownMarkWarning at the level of the user’s code, not pytest’s.
* Fix interaction with --pdb and unittests: do not use unittest’s TestCase.debug().
* Fix summary entries appearing twice when f/F and s/S report chars were used at the same time in the -r command-line option (for example -rFf).
The upper case variants were never documented and the preferred form should be the lower case.
* Fallback to green (instead of yellow) for non-last items without previous passes with colored terminal progress indicator.
* --disable-warnings is honored with -ra and -rA.
* Fix bug in the comparison of request key with cached key in fixture.
A construct if key == cached_key: can fail either because == is explicitly disallowed, or for, e.g., NumPy arrays, where the result of a == b cannot generally be converted to bool. The implemented fix replaces == with is.
* Make capture output streams .write() method return the same return value from original streams.
* Fix EncodedFile.writelines to call the underlying buffer’s writelines method.
* Fix internal crash when faulthandler starts initialized (for example with PYTHONFAULTHANDLER=1 environment variable set) and faulthandler_timeout defined in the configuration file.
* Fix node ids which contain a parametrized empty-string variable.
* Assertion rewriting hooks are (re)stored for the current item, which fixes them being still used after e.g. pytester’s testdir.runpytest etc.
* pytest.exit() is handled when emitted from the pytest_sessionfinish hook. This includes quitting from a debugger.
* When pytest.raises() is used as a function (as opposed to a context manager), a match keyword argument is now passed through to the tested function. Previously it was swallowed and ignored (regression in pytest 5.1.0).
* Do not display empty lines inbetween traceback for unexpected exceptions with doctests.
* The testdir fixture works within doctests now.

Improved Documentation
* Add list of fixtures to start of fixture chapter.
* Expand first sentence on fixtures into a paragraph.
Trivial/Internal Changes
* Remove usage of parser module, deprecated in Python 3.9.
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.2 2019/12/15 11:30:37 adam Exp $
d32 6
d110 3
a112 6
${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
d134 1
d174 3
d195 4
@


1.16
log
@py-test: updated to 4.2.0

pytest 4.2.0:

Features
* Class xunit-style functions and methods now obey the scope of autouse fixtures.
This fixes a number of surprising issues like setup_method being called before session-scoped autouse fixtures.

* Display a message at the end of the test session when running under Python 2.7 and 3.4 that pytest 5.0 will no longer support those Python versions.
* The number of selected tests now are also displayed when the -k or -m flags are used.
* pytest_report_teststatus hook now can also receive a config parameter.
* pytest_terminal_summary hook now can also receive a config parameter.

Bug Fixes
* --junitxml can emit XML compatible with Jenkins xUnit. junit_family INI option accepts legacy|xunit1, which produces old style output, and xunit2 that conforms more strictly to https://github.com/jenkinsci/xunit-plugin/blob/xunit-2.3.2/src/main/resources/org/jenkinsci/plugins/xunit/types/model/xsd/junit-10.xsd
* Improve quitting from pdb, especially with --trace.
Using q[quit] after pdb.set_trace() will quit pytest also.

* Warning summary now groups warnings by message instead of by test id.
This makes the output more compact and better conveys the general idea of how much code is actually generating warnings, instead of how many tests call that code.

* monkeypatch.delattr handles class descriptors like staticmethod/classmethod.
* Restore marks being considered keywords for keyword expressions.
* tmp_path fixture and other related ones provides resolved path (a.k.a real path)
* pytest_terminal_summary uses result from pytest_report_teststatus hook, rather than hardcoded strings.
* Correctly handle unittest.SkipTest exception containing non-ascii characters on Python 2.
* Ensure the tmpdir and the tmp_path fixtures are the same folder.
* Ensure tmp_path is always a real path.

Trivial/Internal Changes
* Use a.item() instead of the deprecated np.asscalar(a) in pytest.approx.
np.asscalar has been deprecated in numpy 1.16..

* Copy saferepr from pylib
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.15 2018/11/05 08:36:25 adam Exp $
a19 3
${PYSITELIB}/_pytest/_code/_py2traceback.py
${PYSITELIB}/_pytest/_code/_py2traceback.pyc
${PYSITELIB}/_pytest/_code/_py2traceback.pyo
d77 3
d164 3
d182 6
a187 3
${PYSITELIB}/pytest.py
${PYSITELIB}/pytest.pyc
${PYSITELIB}/pytest.pyo
@


1.15
log
@py-test: updated to 3.10.0

pytest 3.10.0:

Features
* Resume capturing output after continue with __import__("pdb").set_trace().
  This also adds a new pytest_leave_pdb hook, and passes in pdb to the existing pytest_enter_pdb hook.
* Add -sw, --stepwise as an alternative to --lf -x for stopping at the first failure, but starting the next test invocation from that test. See the documentation for more info.
* Make --color emit colorful dots when not running in verbose mode. Earlier, it would only colorize the test-by-test output if --verbose was also passed.
* Improve performance with collection reporting in non-quiet mode with terminals.
  The “collecting …” message is only printed/updated every 0.5s.

Bug Fixes
* Fix false RemovedInPytest4Warning: usage of Session... is deprecated, please use pytest warnings.
* Fix problems with running tests in package __init__.py files.
* Swallow warnings during anonymous compilation of source.
* Fix access denied error when deleting stale directories created by tmpdir / tmp_path.
* Naming a fixture request will now raise a warning: the request fixture is internal and should not be overwritten as it will lead to internal errors.
* Handle (ignore) exceptions raised during collection, e.g. with Django’s LazySettings proxy class.

Improved Documentation
* Added missing documentation about the fact that module names passed to filter warnings are not regex-escaped.

Trivial/Internal Changes
* Display cachedir also in non-verbose mode if non-default.
* pdb: improve message about output capturing with set_trace.
  Do not display “IO-capturing turned off/on” when -s is used to avoid confusion.
* Improve message and stack level of warnings issued by monkeypatch.setenv when the value of the environment variable is not a str.
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.14 2018/10/18 10:11:25 adam Exp $
d29 6
@


1.14
log
@py-test: updated to 3.9.1

pytest 3.9.1:
Features
- For test-suites containing test classes, the information about the subclassed module is now output only if a higher verbosity level is specified (at least “-vv”).

pytest 3.9.0:
Deprecations
- The following accesses have been documented as deprecated for years, but are now actually emitting deprecation warnings.
Access of Module, Function, Class, Instance, File and Item through Node instances. Now users will this warning:
usage of Function.Module is deprecated, please use pytest.Module instead
Users should just import pytest and access those objects using the pytest module.
request.cached_setup, this was the precursor of the setup/teardown mechanism available to fixtures. You can consult funcarg comparison section in the docs.
Using objects named "Class" as a way to customize the type of nodes that are collected in Collector subclasses has been deprecated. Users instead should use pytest_collect_make_item to customize node types during collection.
This issue should affect only advanced plugins who create new collection types, so if you see this warning message please contact the authors so they can change the code.
The warning that produces the message below has changed to RemovedInPytest4Warning:
getfuncargvalue is deprecated, use getfixturevalue
- Add a Deprecation warning for pytest.ensuretemp as it was deprecated since a while.

Features
- Improve usage errors messages by hiding internal details which can be distracting and noisy.
This has the side effect that some error conditions that previously raised generic errors (such as ValueError for unregistered marks) are now raising Failed exceptions.
- Improve the error displayed when a conftest.py file could not be imported.
In order to implement this, a new chain parameter was added to ExceptionInfo.getrepr to show or hide chained tracebacks in Python 3 (defaults to True).
- Add empty_parameter_set_mark=fail_at_collect ini option for raising an exception when parametrize collects an empty set.
- Log messages generated in the collection phase are shown when live-logging is enabled and/or when they are logged to a file.
- Introduce tmp_path as a fixture providing a Path object.
- Deprecation warnings are now shown even if you customize the warnings filters yourself. In the previous version any customization would override pytest’s filters and deprecation warnings would fall back to being hidden by default.
- Allow specification of timeout for Testdir.runpytest_subprocess() and Testdir.run().
- Add returncode argument to pytest.exit() to exit pytest with a specific return code.
- Reimplement pytest.deprecated_call using pytest.warns so it supports the match='...' keyword argument.
This has the side effect that pytest.deprecated_call now raises pytest.fail.Exception instead of AssertionError.
- Require setuptools>=30.3 and move most of the metadata to setup.cfg.

Bug Fixes
- Improve error message when test functions of unittest.TestCase subclasses use a parametrized fixture.
- request.fixturenames now correctly returns the name of fixtures created by request.getfixturevalue().
- Warning filters passed as command line options using -W now take precedence over filters defined in ini configuration files.
- Fix source reindenting by using textwrap.dedent directly.
- pytest.warn will capture previously-warned warnings in Python 2. Previously they were never raised.
- Resolve symbolic links for args.
This fixes running pytest tests/test_foo.py::test_bar, where tests is a symlink to project/app/tests: previously project/app/conftest.py would be ignored for fixtures then.
- Fix duplicate printing of internal errors when using --pdb.
- pathlib based tmpdir cleanup now correctly handles symlinks in the folder.
- Display the filename when encountering SyntaxWarning.

Improved Documentation
- Update usefixtures documentation to clarify that it can’t be used with fixture functions.
- Update fixture documentation to specify that a fixture can be invoked twice in the scope it’s defined for.
- According to unittest.rst, setUpModule and tearDownModule were not implemented, but it turns out they are. So updated the documentation for unittest.
- Add tempir testing example to CONTRIBUTING.rst guide
Trivial/Internal Changes
- The internal MarkerError exception has been removed.
- Port the implementation of tmpdir to pathlib.
- Exclude 0.00 second entries from --duration output unless -vv is passed on the command-line.
- Fixed formatting of string literals in internal tests.
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.13 2018/09/07 08:55:43 adam Exp $
d155 3
@


1.13
log
@py-test: updated to 3.8.0

pytest 3.8.0:

Deprecations and Removals
- Config.warn has been deprecated, it should be replaced by calls to the standard warnings.warn.
  Node.warn now supports two signatures:
  * node.warn(PytestWarning("some message")): is now the recommended way to call this function. The warning
    instance must be a PytestWarning or subclass  instance.
  * node.warn("CI", "some message"): this code/message form is now deprecated and should be converted to
    the warning instance form above.
  RemovedInPytest4Warning and PytestExperimentalApiWarning are now part of the public API and should be accessed
  using pytest.RemovedInPytest4Warning and pytest.PytestExperimentalApiWarning.
- @@pytest.mark.filterwarnings second parameter is no longer regex-escaped,
  making it possible to actually use regular expressions to check the warning message.
  **Note**: regex-escaping the match string was an implementation oversight that might break test suites which depend
  on the old behavior.

Features
- Internal pytest warnings are now issued using the standard warnings module, making it possible to use
  the standard warnings filters to manage those warnings. This introduces PytestWarning,
  PytestDeprecationWarning and RemovedInPytest4Warning warning types as part of the public API.
- DeprecationWarning and PendingDeprecationWarning are now shown by default if no other warning filter is
  configured.
- Add option to disable plugin auto-loading.
- Added the count option to console_output_style to enable displaying the progress as a count instead of a percentage.
- Added support for 'xfailed' and 'xpassed' outcomes to the pytester.RunResult.assert_outcomes signature.
- Terminal writer now takes into account unicode character width when writing out progress.
- Pytest now returns with correct exit code (EXIT_USAGEERROR, 4) when called with unknown arguments.
- Improve performance of assertion rewriting.

- Added a blurb in usage.rst for the usage of -r flag which is used to show an extra test summary info.
- Corrected type of the exceptions collection passed to xfail: raises argument accepts a tuple instead of list.

Trivial/Internal Changes
- Removed "run all (no recorded failures)" message printed with --failed-first and --last-failed when there are no failed tests.
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.12 2018/08/05 10:17:47 adam Exp $
d122 3
a124 3
${PYSITELIB}/_pytest/paths.py
${PYSITELIB}/_pytest/paths.pyc
${PYSITELIB}/_pytest/paths.pyo
@


1.12
log
@py-test: updated to 3.7.1

pytest 3.7.1:

Bug Fixes
- Raise immediately if approx() is given an expected value of a type it doesn't understand (e.g. strings, nested dicts, etc.).
- Correctly represent the dimensions of an numpy array when calling repr() on approx().
- Display the absolute path if cache_dir is not relative to the rootdir instead of failing.
- Fix compatibility problem with plugins and the warning code issued by fixture functions when they are called directly.
- Fix infinite recursion in pytest.approx with arrays in numpy<1.13.
- Pin pathlib2 to >=2.2.0 as we require __fspath__ support.
- Fix TypeError when the assertion message is bytes in python 3.


pytest 3.7.0:

Deprecations and Removals
- pytest_namespace has been deprecated.
  See the documentation for pytest_namespace hook for suggestions on how to deal
  with this in plugins which use this functionality.
- Calling a fixture function directly, as opposed to request them in a test function, now issues a RemovedInPytest4Warning. It will be changed into an error in pytest 4.0.
  This is a great source of confusion to new users, which will often call the fixture functions and request them from test functions interchangeably, which breaks the fixture resolution model.

Features
- New package fixture scope: fixtures are finalized when the last test of a *package* finishes. This feature is considered **experimental**, so use it sparingly.
- Node.add_marker now supports an append=True/False parameter to determine whether the mark comes last (default) or first.
- Fixture caplog now has a messages property, providing convenient access to the format-interpolated log messages without the extra data provided by the formatter/handler.
- New --trace option to enter the debugger at the start of a test.
- Introduce pytester.copy_example as helper to do acceptance tests against examples from the project.

Bug Fixes
- Fix a bug where fixtures overridden by direct parameters (for example parametrization) were being instantiated even if they were not being used by a test.
- Fix ApproxNumpy initialisation argument mixup, abs and rel tolerances were flipped causing strange comparsion results.
  Add tests to check abs and rel tolerances for np.array and test for expecting nan with np.array()
- Fix truncated locals output in verbose mode.

Improved Documentation
- Correct the usage documentation of --last-failed-no-failures by adding the missing --last-failed argument in the presented examples, because they are misleading and lead to think that the missing argument is not needed.

Trivial/Internal Changes
- Now a README.md file is created in .pytest_cache to make it clear why the directory exists.
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.11 2018/06/21 06:41:14 adam Exp $
a73 3
${PYSITELIB}/_pytest/experiments.py
${PYSITELIB}/_pytest/experiments.pyc
${PYSITELIB}/_pytest/experiments.pyo
d164 3
@


1.11
log
@py-test: updated to 3.6.2

Pytest 3.6.2:

Bug Fixes
Fix regression in Node.add_marker by extracting the mark object of a MarkDecorator.
Warnings without location were reported as None. This is corrected to now report <undetermined location>.
Continue to call finalizers in the stack when a finalizer in a former scope raises an exception.
Fix encoding error with print statements in doctests

Improved Documentation
Add documentation for the --strict flag.

Trivial/Internal Changes
Update old quotation style to parens in fixture.rst documentation.
Improve display of hint about --fulltrace with KeyboardInterrupt.
pytest’s testsuite is no longer runnable through python setup.py test – instead invoke pytest or tox directly.
Fix typo in documentation
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.10 2018/03/23 08:58:00 adam Exp $
d74 3
d125 3
d140 3
@


1.10
log
@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
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.9 2017/11/28 09:04:56 adam Exp $
d53 12
a64 3
${PYSITELIB}/_pytest/config.py
${PYSITELIB}/_pytest/config.pyc
${PYSITELIB}/_pytest/config.pyo
@


1.9
log
@py-test: updated to 3.3.0

Pytest 3.3.0:

Deprecations and Removals
-------------------------
Pytest no longer supports Python 2.6 and 3.3. Those Python versions are EOL for some time now and incur maintenance and compatibility costs on the pytest core team, and following up with the rest of the community we decided that they will no longer be supported starting on this version. Users which still require those versions should pin pytest to <3.3.
Remove internal _preloadplugins() function. This removal is part of the pytest_namespace() hook deprecation.
Internally change CallSpec2 to have a list of marks instead of a broken mapping of keywords. This removes the keywords attribute of the internal CallSpec2 class.
Remove ParameterSet.deprecated_arg_dict - its not a public api and the lack of the underscore was a naming error.
Remove the internal multi-typed attribute Node._evalskip and replace it with the boolean Node._skipped_by_mark.

Features
--------
pytest_fixture_post_finalizer hook can now receive a request argument.
Replace the old introspection code in compat.py that determines the available arguments of fixtures with inspect.signature on Python 3 and funcsigs.signature on Python 2. This should respect __signature__ declarations on functions.
Report tests with global pytestmark variable only once.
Now pytest displays the total progress percentage while running tests. The previous output style can be set by configuring the console_output_style setting to classic.
Match warns signature to raises by adding match keyword.
Pytest now captures and displays output from the standard logging module. The user can control the logging level to be captured by specifying options in pytest.ini, the command line and also during individual tests using markers. Also, a caplog fixture is available that enables users to test the captured log during specific tests (similar to capsys for example). For more information, please see the logging docs. This feature was introduced by merging the popular pytest-catchlog plugin, thanks to Thomas Hisch. Be advised that during the merging the backward compatibility interface with the defunct pytest-capturelog has been dropped.
Add allow_module_level kwarg to pytest.skip(), enabling to skip the whole module.
Allow setting file_or_dir, -c, and -o in PYTEST_ADDOPTS.
Return stdout/stderr capture results as a namedtuple, so out and ``err`` can be accessed by attribute.
Add capfdbinary, a version of capfd which returns bytes from readouterr().
Add capsysbinary a version of capsys which returns bytes from readouterr().
Implement feature to skip setup.py files when run with --doctest-modules.
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.8 2017/11/15 07:43:41 adam Exp $
d86 12
a97 3
${PYSITELIB}/_pytest/mark.py
${PYSITELIB}/_pytest/mark.pyc
${PYSITELIB}/_pytest/mark.pyo
@


1.8
log
@py-test: updated to 3.2.4

Pytest 3.2.4:
Bug Fixes
* Fix the bug where running with --pyargs will result in items with empty parent.nodeid if run from a different root directory.
* Fix issue with @@pytest.parametrize if argnames was specified as keyword arguments.
* Strip whitespace from marker names when reading them from INI config.
* Show full context of doctest source in the pytest output, if the line number of failed example in the docstring is < 9
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.7 2017/08/03 07:44:11 adam Exp $
a28 3
${PYSITELIB}/_pytest/_pluggy.py
${PYSITELIB}/_pytest/_pluggy.pyc
${PYSITELIB}/_pytest/_pluggy.pyo
d80 3
a139 6
${PYSITELIB}/_pytest/vendored_packages/__init__.py
${PYSITELIB}/_pytest/vendored_packages/__init__.pyc
${PYSITELIB}/_pytest/vendored_packages/__init__.pyo
${PYSITELIB}/_pytest/vendored_packages/pluggy.py
${PYSITELIB}/_pytest/vendored_packages/pluggy.pyc
${PYSITELIB}/_pytest/vendored_packages/pluggy.pyo
@


1.7
log
@Pytest 3.2.0:
Deprecations and Removals
pytest.approx no longer supports >, >=, < and <= operators to avoid surprising/inconsistent behavior. See the docs for more information.
All old-style specific behavior in current classes in the pytest’s API is considered deprecated at this point and will be removed in a future release. This affects Python 2 users only and in rare situations.
A deprecation warning is now raised when using marks for parameters in pytest.mark.parametrize. Use pytest.param to apply marks to parameters instead.

Features
Add support for numpy arrays (and dicts) to approx.
Now test function objects have a pytestmark attribute containing a list of marks applied directly to the test function, as opposed to marks inherited from parent classes or modules.
Collection ignores local virtualenvs by default; –collect-in-virtualenv overrides this behavior.
Allow class methods decorated as @@staticmethod to be candidates for collection as a test function. (Only for Python 2.7 and above. Python 2.6 will still ignore static methods.)
Introduce mark.with_args in order to allow passing functions/classes as sole argument to marks.
New cache_dir ini option: sets the directory where the contents of the cache plugin are stored. Directory may be relative or absolute path: if relative path, then directory is created relative to rootdir, otherwise it is used as is. Additionally path may contain environment variables which are expanded during runtime.
Introduce the PYTEST_CURRENT_TEST environment variable that is set with the nodeid and stage (setup, call and teardown) of the test being currently executed. See the documentation for more info.
Introduced @@pytest.mark.filterwarnings mark which allows overwriting the warnings filter on a per test, class or module level. See the docs for more information.
--last-failed now remembers forever when a test has failed and only forgets it if it passes again. This makes it easy to fix a test suite by selectively running files and fixing tests incrementally.
New pytest_report_collectionfinish hook which allows plugins to add messages to the terminal reporting after collection has been finished successfully.
Added support for PEP-415’s Exception.__suppress_context__. Now if a raise exception from None is caught by pytest, pytest will no longer chain the context in the test report. The behavior now matches Python’s traceback behavior.
Exceptions raised by pytest.fail, pytest.skip and pytest.xfail now subclass BaseException, making them harder to be caught unintentionally by normal code.

Bug Fixes
Set stdin to a closed PIPE in pytester.py.Testdir.popen() for avoid unwanted interactive pdb
Add missing encoding attribute to sys.std* streams when using capsys capture mode.
Fix terminal color changing to black on Windows if colorama is imported in a conftest.py file.
Fix line number when reporting summary of skipped tests.
capture: ensure that EncodedFile.name is a string.
The options --fixtures and --fixtures-per-test will now keep indentation within docstrings.
doctests line numbers are now reported correctly, fixing pytest-sugar.
Fix non-determinism in order of fixture collection. Adds new dependency (ordereddict) for Python 2.6.
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.6 2017/05/23 08:30:11 adam Exp $
d92 3
@


1.6
log
@Chages 3.1.0:

New Features

* The ``pytest-warnings`` plugin has been integrated into the core, so now ``pytest`` automatica
lly
  captures and displays warnings at the end of the test session.

* Added ``junit_suite_name`` ini option to specify root `<testsuite>` name for JUnit XML reports

* Added an ini option ``doctest_encoding`` to specify which encoding to use for doctest files.

* ``pytest.warns`` now checks for subclass relationship rather than
  class equality.

* ``pytest.raises`` now asserts that the error message matches a text or regex
  with the ``match`` keyword argument.

* ``pytest.param`` can be used to declare test parameter sets with marks and test ids.
@
text
@d1 1
a1 1
@@comment $NetBSD: PLIST,v 1.5 2016/08/22 13:26:28 wiz Exp $
d95 3
d107 3
@


1.5
log
@Updated py-test to 3.0.0.

Add ALTERNATIVES file.

3.0.0
=====

**Incompatible changes**


A number of incompatible changes were made in this release, with the intent of removing features deprecated for a long
time or change existing behaviors in order to make them less surprising/more useful.

* Reinterpretation mode has now been removed.  Only plain and rewrite
  mode are available, consequently the ``--assert=reinterp`` option is
  no longer available.  Thanks `@@flub`_ for the PR.

* The following deprecated commandline options were removed:

  * ``--genscript``: no longer supported;
  * ``--no-assert``: use ``--assert=plain`` instead;
  * ``--nomagic``: use ``--assert=plain`` instead;
  * ``--report``: use ``-r`` instead;

  Thanks to `@@RedBeardCode`_ for the PR (`#1664`_).

* ImportErrors in plugins now are a fatal error instead of issuing a
  pytest warning (`#1479`_). Thanks to `@@The-Compiler`_ for the PR.

* Removed support code for Python 3 versions < 3.3 (`#1627`_).

* Removed all ``py.test-X*`` entry points. The versioned, suffixed entry points
  were never documented and a leftover from a pre-virtualenv era. These entry
  points also created broken entry points in wheels, so removing them also
  removes a source of confusion for users (`#1632`_).
  Thanks `@@obestwalter`_ for the PR.

* ``pytest.skip()`` now raises an error when used to decorate a test function,
  as opposed to its original intent (to imperatively skip a test inside a test function). Previously
  this usage would cause the entire module to be skipped (`#607`_).
  Thanks `@@omarkohl`_ for the complete PR (`#1519`_).

* Exit tests if a collection error occurs. A poll indicated most users will hit CTRL-C
  anyway as soon as they see collection errors, so pytest might as well make that the default behavior (`#1421`_).
  A ``--continue-on-collection-errors`` option has been added to restore the previous behaviour.
  Thanks `@@olegpidsadnyi`_ and `@@omarkohl`_ for the complete PR (`#1628`_).

* Renamed the pytest ``pdb`` module (plugin) into ``debugging`` to avoid clashes with the builtin ``pdb`` module.

* Raise a helpful failure message when requesting a parametrized fixture at runtime,
  e.g. with ``request.getfixturevalue``. Previously these parameters were simply
  never defined, so a fixture decorated like ``@@pytest.fixture(params=[0, 1, 2])``
  only ran once (`#460`_).
  Thanks to `@@nikratio`_ for the bug report, `@@RedBeardCode`_ and `@@tomviner`_ for the PR.

* ``_pytest.monkeypatch.monkeypatch`` class has been renamed to ``_pytest.monkeypatch.MonkeyPatch``
  so it doesn't conflict with the ``monkeypatch`` fixture.

* ``--exitfirst / -x`` can now be overridden by a following ``--maxfail=N``
  and is just a synonym for ``--maxfail=1``.


**New Features**

* Support nose-style ``__test__`` attribute on methods of classes,
  including unittest-style Classes. If set to ``False``, the test will not be
  collected.

* New ``doctest_namespace`` fixture for injecting names into the
  namespace in which doctests run.
  Thanks `@@milliams`_ for the complete PR (`#1428`_).

* New ``--doctest-report`` option available to change the output format of diffs
  when running (failing) doctests (implements `#1749`_).
  Thanks `@@hartym`_ for the PR.

* New ``name`` argument to ``pytest.fixture`` decorator which allows a custom name
  for a fixture (to solve the funcarg-shadowing-fixture problem).
  Thanks `@@novas0x2a`_ for the complete PR (`#1444`_).

* New ``approx()`` function for easily comparing floating-point numbers in
  tests.
  Thanks `@@kalekundert`_ for the complete PR (`#1441`_).

* Ability to add global properties in the final xunit output file by accessing
  the internal ``junitxml`` plugin (experimental).
  Thanks `@@tareqalayan`_ for the complete PR `#1454`_).

* New ``ExceptionInfo.match()`` method to match a regular expression on the
  string representation of an exception (`#372`_).
  Thanks `@@omarkohl`_ for the complete PR (`#1502`_).

* ``__tracebackhide__`` can now also be set to a callable which then can decide
  whether to filter the traceback based on the ``ExceptionInfo`` object passed
  to it. Thanks `@@The-Compiler`_ for the complete PR (`#1526`_).

* New ``pytest_make_parametrize_id(config, val)`` hook which can be used by plugins to provide
  friendly strings for custom types.
  Thanks `@@palaviv`_ for the PR.

* ``capsys`` and ``capfd`` now have a ``disabled()`` context-manager method, which
  can be used to temporarily disable capture within a test.
  Thanks `@@nicoddemus`_ for the PR.

* New cli flag ``--fixtures-per-test``: shows which fixtures are being used
  for each selected test item. Features doc strings of fixtures by default.
  Can also show where fixtures are defined if combined with ``-v``.
  Thanks `@@hackebrot`_ for the PR.

* Introduce ``pytest`` command as recommended entry point. Note that ``py.test``
  still works and is not scheduled for removal. Closes proposal
  `#1629`_. Thanks `@@obestwalter`_ and `@@davehunt`_ for the complete PR
  (`#1633`_).

* New cli flags:

  + ``--setup-plan``: performs normal collection and reports
    the potential setup and teardown and does not execute any fixtures and tests;
  + ``--setup-only``: performs normal collection, executes setup and teardown of
    fixtures and reports them;
  + ``--setup-show``: performs normal test execution and additionally shows
    setup and teardown of fixtures;
  + ``--keep-duplicates``: py.test now ignores duplicated paths given in the command
    line. To retain the previous behavior where the same test could be run multiple
    times by specifying it in the command-line multiple times, pass the ``--keep-duplicates``
    argument (`#1609`_);

  Thanks `@@d6e`_, `@@kvas-it`_, `@@sallner`_, `@@ioggstream`_ and `@@omarkohl`_ for the PRs.

* New CLI flag ``--override-ini``/``-o``: overrides values from the ini file.
  For example: ``"-o xfail_strict=True"``'.
  Thanks `@@blueyed`_ and `@@fengxx`_ for the PR.

* New hooks:

  + ``pytest_fixture_setup(fixturedef, request)``: executes fixture setup;
  + ``pytest_fixture_post_finalizer(fixturedef)``: called after the fixture's
    finalizer and has access to the fixture's result cache.

  Thanks `@@d6e`_, `@@sallner`_.

* Issue warnings for asserts whose test is a tuple literal. Such asserts will
  never fail because tuples are always truthy and are usually a mistake
  (see `#1562`_). Thanks `@@kvas-it`_, for the PR.

* Allow passing a custom debugger class (e.g. ``--pdbcls=IPython.core.debugger:Pdb``).
  Thanks to `@@anntzer`_ for the PR.


**Changes**

* Plugins now benefit from assertion rewriting.  Thanks
  `@@sober7`_, `@@nicoddemus`_ and `@@flub`_ for the PR.

* Change ``report.outcome`` for ``xpassed`` tests to ``"passed"`` in non-strict
  mode and ``"failed"`` in strict mode. Thanks to `@@hackebrot`_ for the PR
  (`#1795`_) and `@@gprasad84`_ for report (`#1546`_).

* Tests marked with ``xfail(strict=False)`` (the default) now appear in
  JUnitXML reports as passing tests instead of skipped.
  Thanks to `@@hackebrot`_ for the PR (`#1795`_).

* Highlight path of the file location in the error report to make it easier to copy/paste.
  Thanks `@@suzaku`_ for the PR (`#1778`_).

* Fixtures marked with ``@@pytest.fixture`` can now use ``yield`` statements exactly like
  those marked with the ``@@pytest.yield_fixture`` decorator. This change renders
  ``@@pytest.yield_fixture`` deprecated and makes ``@@pytest.fixture`` with ``yield`` statements
  the preferred way to write teardown code (`#1461`_).
  Thanks `@@csaftoiu`_ for bringing this to attention and `@@nicoddemus`_ for the PR.

* Explicitly passed parametrize ids do not get escaped to ascii (`#1351`_).
  Thanks `@@ceridwen`_ for the PR.

* Fixtures are now sorted in the error message displayed when an unknown
  fixture is declared in a test function.
  Thanks `@@nicoddemus`_ for the PR.

* ``pytest_terminal_summary`` hook now receives the ``exitstatus``
  of the test session as argument. Thanks `@@blueyed`_ for the PR (`#1809`_).

* Parametrize ids can accept ``None`` as specific test id, in which case the
  automatically generated id for that argument will be used.
  Thanks `@@palaviv`_ for the complete PR (`#1468`_).

* The parameter to xunit-style setup/teardown methods (``setup_method``,
  ``setup_module``, etc.) is now optional and may be omitted.
  Thanks `@@okken`_ for bringing this to attention and `@@nicoddemus`_ for the PR.

* Improved automatic id generation selection in case of duplicate ids in
  parametrize.
  Thanks `@@palaviv`_ for the complete PR (`#1474`_).

* Now pytest warnings summary is shown up by default. Added a new flag
  ``--disable-pytest-warnings`` to explicitly disable the warnings summary (`#1668`_).

* Make ImportError during collection more explicit by reminding
  the user to check the name of the test module/package(s) (`#1426`_).
  Thanks `@@omarkohl`_ for the complete PR (`#1520`_).

* Add ``build/`` and ``dist/`` to the default ``--norecursedirs`` list. Thanks
  `@@mikofski`_ for the report and `@@tomviner`_ for the PR (`#1544`_).

* ``pytest.raises`` in the context manager form accepts a custom
  ``message`` to raise when no exception occurred.
  Thanks `@@palaviv`_ for the complete PR (`#1616`_).

* ``conftest.py`` files now benefit from assertion rewriting; previously it
  was only available for test modules. Thanks `@@flub`_, `@@sober7`_ and
  `@@nicoddemus`_ for the PR (`#1619`_).

* Text documents without any doctests no longer appear as "skipped".
  Thanks `@@graingert`_ for reporting and providing a full PR (`#1580`_).

* Ensure that a module within a namespace package can be found when it
  is specified on the command line together with the ``--pyargs``
  option.  Thanks to `@@taschini`_ for the PR (`#1597`_).

* Always include full assertion explanation during assertion rewriting. The previous behaviour was hiding
  sub-expressions that happened to be ``False``, assuming this was redundant information.
  Thanks `@@bagerard`_ for reporting (`#1503`_). Thanks to `@@davehunt`_ and
  `@@tomviner`_ for the PR.

* ``OptionGroup.addoption()`` now checks if option names were already
  added before, to make it easier to track down issues like `#1618`_.
  Before, you only got exceptions later from ``argparse`` library,
  giving no clue about the actual reason for double-added options.

* ``yield``-based tests are considered deprecated and will be removed in pytest-4.0.
  Thanks `@@nicoddemus`_ for the PR.

* ``[pytest]`` sections in ``setup.cfg`` files should now be named ``[tool:pytest]``
  to avoid conflicts with other distutils commands (see `#567`_). ``[pytest]`` sections in
  ``pytest.ini`` or ``tox.ini`` files are supported and unchanged.
  Thanks `@@nicoddemus`_ for the PR.

* Using ``pytest_funcarg__`` prefix to declare fixtures is considered deprecated and will be
  removed in pytest-4.0 (`#1684`_).
  Thanks `@@nicoddemus`_ for the PR.

* Raise helpful failure message, when requesting parametrized fixture at runtime,
  e.g. with ``request.getfuncargvalue``. BACKWARD INCOMPAT: Previously these params
  were simply never defined. So a fixture decorated like ``@@pytest.fixture(params=[0, 1, 2])``
  only ran once. Now a failure is raised. Fixes (`#460`_). Thanks to
  `@@nikratio`_ for bug report, `@@RedBeardCode`_ and `@@tomviner`_ for the PR.

* Passing a command-line string to ``pytest.main()`` is considered deprecated and scheduled
  for removal in pytest-4.0. It is recommended to pass a list of arguments instead (`#1723`_).

* Rename ``getfuncargvalue`` to ``getfixturevalue``. ``getfuncargvalue`` is
  still present but is now considered deprecated. Thanks to `@@RedBeardCode`_ and `@@tomviner`_
  for the PR (`#1626`_).

* ``optparse`` type usage now triggers DeprecationWarnings (`#1740`_).


* ``optparse`` backward compatibility supports float/complex types (`#457`_).

* Refined logic for determining the ``rootdir``, considering only valid
  paths which fixes a number of issues: `#1594`_, `#1435`_ and `#1471`_.
  Thanks to `@@blueyed`_ and `@@davehunt`_ for the PR.

* Always include full assertion explanation. The previous behaviour was hiding
  sub-expressions that happened to be False, assuming this was redundant information.
  Thanks `@@bagerard`_ for reporting (`#1503`_). Thanks to `@@davehunt`_ and
  `@@tomviner`_ for PR.

* Renamed the pytest ``pdb`` module (plugin) into ``debugging``.

* Better message in case of not using parametrized variable (see `#1539`_).
  Thanks to `@@tramwaj29`_ for the PR.

* Updated docstrings with a more uniform style.

* Add stderr write for ``pytest.exit(msg)`` during startup. Previously the message was never shown.
  Thanks `@@BeyondEvil`_ for reporting `#1210`_. Thanks to `@@JonathonSonesen`_ and
  `@@tomviner`_ for the PR.

* No longer display the incorrect test deselection reason (`#1372`_).
  Thanks `@@ronnypfannschmidt`_ for the PR.

* The ``--resultlog`` command line option has been deprecated: it is little used
  and there are more modern and better alternatives (see `#830`_).
  Thanks `@@nicoddemus`_ for the PR.

* Improve error message with fixture lookup errors: add an 'E' to the first
  line and '>' to the rest. Fixes `#717`_. Thanks `@@blueyed`_ for reporting and
  a PR, `@@eolo999`_ for the initial PR and `@@tomviner`_ for his guidance during
  EuroPython2016 sprint.


**Bug Fixes**

* Parametrize now correctly handles duplicated test ids.

* Fix internal error issue when the ``method`` argument is missing for
  ``teardown_method()`` (`#1605`_).

* Fix exception visualization in case the current working directory (CWD) gets
  deleted during testing (`#1235`_). Thanks `@@bukzor`_ for reporting. PR by
  `@@marscher`_.

* Improve test output for logical expression with brackets (`#925`_).
  Thanks `@@DRMacIver`_ for reporting and `@@RedBeardCode`_ for the PR.

* Create correct diff for strings ending with newlines (`#1553`_).
  Thanks `@@Vogtinator`_ for reporting and `@@RedBeardCode`_ and
  `@@tomviner`_ for the PR.

* ``ConftestImportFailure`` now shows the traceback making it easier to
  identify bugs in ``conftest.py`` files (`#1516`_). Thanks `@@txomon`_ for
  the PR.

* Add an 'E' to the first line of error messages from FixtureLookupErrorRepr.
  Fixes `#717`_. Thanks `@@blueyed`_ for reporting, `@@eolo999`_ for the PR
  and `@@tomviner`_ for his guidance during EuroPython2016 sprint.

* Text documents without any doctests no longer appear as "skipped".
  Thanks `@@graingert`_ for reporting and providing a full PR (`#1580`_).

* Fixed collection of classes with custom ``__new__`` method.
  Fixes `#1579`_. Thanks to `@@Stranger6667`_ for the PR.

* Fixed scope overriding inside metafunc.parametrize (`#634`_).
  Thanks to `@@Stranger6667`_ for the PR.

* Fixed the total tests tally in junit xml output (`#1798`_).
  Thanks to `@@cryporchild`_ for the PR.

* Fixed off-by-one error with lines from ``request.node.warn``.
  Thanks to `@@blueyed`_ for the PR.
@
text
@d1 1
a1 1
@@comment $NetBSD$
d32 3
d41 3
d137 3
@


1.4
log
@Update py-test to 2.9.1.

2.9.1
=====

**Bug Fixes**

* Improve error message when a plugin fails to load.
  Thanks `@@nicoddemus`_ for the PR.

* Fix (`#1178 <https://github.com/pytest-dev/pytest/issues/1178>`_):
  ``pytest.fail`` with non-ascii characters raises an internal pytest error.
  Thanks `@@nicoddemus`_ for the PR.

* Fix (`#469`_): junit parses report.nodeid incorrectly, when params IDs
  contain ``::``. Thanks `@@tomviner`_ for the PR (`#1431`_).

* Fix (`#578 <https://github.com/pytest-dev/pytest/issues/578>`_): SyntaxErrors
  containing non-ascii lines at the point of failure generated an internal
  py.test error.
  Thanks `@@asottile`_ for the report and `@@nicoddemus`_ for the PR.

* Fix (`#1437`_): When passing in a bytestring regex pattern to parameterize
  attempt to decode it as utf-8 ignoring errors.

* Fix (`#649`_): parametrized test nodes cannot be specified to run on the command line.


.. _#1437: https://github.com/pytest-dev/pytest/issues/1437
.. _#469: https://github.com/pytest-dev/pytest/issues/469
.. _#1431: https://github.com/pytest-dev/pytest/pull/1431
.. _#649: https://github.com/pytest-dev/pytest/issues/649

.. _@@asottile: https://github.com/asottile


2.9.0
=====

**New Features**

* New ``pytest.mark.skip`` mark, which unconditionally skips marked tests.
  Thanks `@@MichaelAquilina`_ for the complete PR (`#1040`_).

* ``--doctest-glob`` may now be passed multiple times in the command-line.
  Thanks `@@jab`_ and `@@nicoddemus`_ for the PR.

* New ``-rp`` and ``-rP`` reporting options give the summary and full output
  of passing tests, respectively. Thanks to `@@codewarrior0`_ for the PR.

* ``pytest.mark.xfail`` now has a ``strict`` option, which makes ``XPASS``
  tests to fail the test suite (defaulting to ``False``). There's also a
  ``xfail_strict`` ini option that can be used to configure it project-wise.
  Thanks `@@rabbbit`_ for the request and `@@nicoddemus`_ for the PR (`#1355`_).

* ``Parser.addini`` now supports options of type ``bool``.
  Thanks `@@nicoddemus`_ for the PR.

* New ``ALLOW_BYTES`` doctest option. This strips ``b`` prefixes from byte strings
  in doctest output (similar to ``ALLOW_UNICODE``).
  Thanks `@@jaraco`_ for the request and `@@nicoddemus`_ for the PR (`#1287`_).

* Give a hint on ``KeyboardInterrupt`` to use the ``--fulltrace`` option to show the errors.
  Fixes `#1366`_.
  Thanks to `@@hpk42`_ for the report and `@@RonnyPfannschmidt`_ for the PR.

* Catch ``IndexError`` exceptions when getting exception source location.
  Fixes a pytest internal error for dynamically generated code (fixtures and tests)
  where source lines are fake by intention.

**Changes**

* **Important**: `py.code <http://pylib.readthedocs.org/en/latest/code.html>`_ has been
  merged into the ``pytest`` repository as ``pytest._code``. This decision
  was made because ``py.code`` had very few uses outside ``pytest`` and the
  fact that it was in a different repository made it difficult to fix bugs on
  its code in a timely manner. The team hopes with this to be able to better
  refactor out and improve that code.
  This change shouldn't affect users, but it is useful to let users aware
  if they encounter any strange behavior.

  Keep in mind that the code for ``pytest._code`` is **private** and
  **experimental**, so you definitely should not import it explicitly!

  Please note that the original ``py.code`` is still available in
  `pylib <http://pylib.readthedocs.org>`_.

* ``pytest_enter_pdb`` now optionally receives the pytest config object.
  Thanks `@@nicoddemus`_ for the PR.

* Removed code and documentation for Python 2.5 or lower versions,
  including removal of the obsolete ``_pytest.assertion.oldinterpret`` module.
  Thanks `@@nicoddemus`_ for the PR (`#1226`_).

* Comparisons now always show up in full when ``CI`` or ``BUILD_NUMBER`` is
  found in the environment, even when ``-vv`` isn't used.
  Thanks `@@The-Compiler`_ for the PR.

* ``--lf`` and ``--ff`` now support long names: ``--last-failed`` and
  ``--failed-first`` respectively.
  Thanks `@@MichaelAquilina`_ for the PR.

* Added expected exceptions to ``pytest.raises`` fail message.

* Collection only displays progress ("collecting X items") when in a terminal.
  This avoids cluttering the output when using ``--color=yes`` to obtain
  colors in CI integrations systems (`#1397`_).

**Bug Fixes**

* The ``-s`` and ``-c`` options should now work under ``xdist``;
  ``Config.fromdictargs`` now represents its input much more faithfully.
  Thanks to `@@bukzor`_ for the complete PR (`#680`_).

* Fix (`#1290`_): support Python 3.5's ``@@`` operator in assertion rewriting.
  Thanks `@@Shinkenjoe`_ for report with test case and `@@tomviner`_ for the PR.

* Fix formatting utf-8 explanation messages (`#1379`_).
  Thanks `@@biern`_ for the PR.

* Fix `traceback style docs`_ to describe all of the available options
  (auto/long/short/line/native/no), with `auto` being the default since v2.6.
  Thanks `@@hackebrot`_ for the PR.

* Fix (`#1422`_): junit record_xml_property doesn't allow multiple records
  with same name.

.. _`traceback style docs`: https://pytest.org/latest/usage.html#modifying-python-traceback-printing

.. _#1422: https://github.com/pytest-dev/pytest/issues/1422
.. _#1379: https://github.com/pytest-dev/pytest/issues/1379
.. _#1366: https://github.com/pytest-dev/pytest/issues/1366
.. _#1040: https://github.com/pytest-dev/pytest/pull/1040
.. _#680: https://github.com/pytest-dev/pytest/issues/680
.. _#1287: https://github.com/pytest-dev/pytest/pull/1287
.. _#1226: https://github.com/pytest-dev/pytest/pull/1226
.. _#1290: https://github.com/pytest-dev/pytest/pull/1290
.. _#1355: https://github.com/pytest-dev/pytest/pull/1355
.. _#1397: https://github.com/pytest-dev/pytest/issues/1397
.. _@@biern: https://github.com/biern
.. _@@MichaelAquilina: https://github.com/MichaelAquilina
.. _@@bukzor: https://github.com/bukzor
.. _@@hpk42: https://github.com/hpk42
.. _@@nicoddemus: https://github.com/nicoddemus
.. _@@jab: https://github.com/jab
.. _@@codewarrior0: https://github.com/codewarrior0
.. _@@jaraco: https://github.com/jaraco
.. _@@The-Compiler: https://github.com/The-Compiler
.. _@@Shinkenjoe: https://github.com/Shinkenjoe
.. _@@tomviner: https://github.com/tomviner
.. _@@RonnyPfannschmidt: https://github.com/RonnyPfannschmidt
.. _@@rabbbit: https://github.com/rabbbit
.. _@@hackebrot: https://github.com/hackebrot
@
text
@d3 1
a34 3
${PYSITELIB}/_pytest/assertion/reinterpret.py
${PYSITELIB}/_pytest/assertion/reinterpret.pyc
${PYSITELIB}/_pytest/assertion/reinterpret.pyo
d47 3
d53 6
d62 6
a67 3
${PYSITELIB}/_pytest/genscript.py
${PYSITELIB}/_pytest/genscript.pyc
${PYSITELIB}/_pytest/genscript.pyo
a91 3
${PYSITELIB}/_pytest/pdb.py
${PYSITELIB}/_pytest/pdb.pyc
${PYSITELIB}/_pytest/pdb.pyo
d107 6
a115 3
${PYSITELIB}/_pytest/standalonetemplate.py
${PYSITELIB}/_pytest/standalonetemplate.pyc
${PYSITELIB}/_pytest/standalonetemplate.pyo
@


1.3
log
@Update py-test to 2.8.2:

2.8.2
-----

- fix #1085: proper handling of encoding errors when passing encoded byte
  strings to pytest.parametrize in Python 2.
  Thanks Themanwithoutaplan for the report and Bruno Oliveira for the PR.

- fix #1087: handling SystemError when passing empty byte strings to
  pytest.parametrize in Python 3.
  Thanks Paul Kehrer for the report and Bruno Oliveira for the PR.

- fix #995: fixed internal error when filtering tracebacks where one entry
  was generated by an exec() statement.
  Thanks Daniel Hahler, Ashley C Straw, Philippe Gauthier and Pavel Savchenko
  for contributing and Bruno Oliveira for the PR.

2.8.1
-----

- fix #1034: Add missing nodeid on pytest_logwarning call in
  addhook.  Thanks Simon Gomizelj for the PR.

- 'deprecated_call' is now only satisfied with a DeprecationWarning or
  PendingDeprecationWarning. Before 2.8.0, it accepted any warning, and 2.8.0
  made it accept only DeprecationWarning (but not PendingDeprecationWarning).
  Thanks Alex Gaynor for the issue and Eric Hunsberger for the PR.

- fix issue #1073: avoid calling __getattr__ on potential plugin objects.
  This fixes an incompatibility with pytest-django.  Thanks Andreas Pelme,
  Bruno Oliveira and Ronny Pfannschmidt for contributing and Holger Krekel
  for the fix.

- Fix issue #704: handle versionconflict during plugin loading more
  gracefully.  Thanks Bruno Oliveira for the PR.

- Fix issue #1064: ""--junitxml" regression when used with the
  "pytest-xdist" plugin, with test reports being assigned to the wrong tests.
  Thanks Daniel Grunwald for the report and Bruno Oliveira for the PR.

- (experimental) adapt more SEMVER style versioning and change meaning of
  master branch in git repo: "master" branch now keeps the bugfixes, changes
  aimed for micro releases.  "features" branch will only be be released
  with minor or major pytest releases.

- Fix issue #766 by removing documentation references to distutils.
  Thanks Russel Winder.

- Fix issue #1030: now byte-strings are escaped to produce item node ids
  to make them always serializable.
  Thanks Andy Freeland for the report and Bruno Oliveira for the PR.

- Python 2: if unicode parametrized values are convertible to ascii, their
  ascii representation is used for the node id.

- Fix issue #411: Add __eq__ method to assertion comparison example.
  Thanks Ben Webb.

- fix issue 877: properly handle assertion explanations with non-ascii repr
  Thanks Mathieu Agopian for the report and Ronny Pfannschmidt for the PR.

- fix issue 1029: transform errors when writing cache values into pytest-warnings

2.8.0
-----------------------------

- new ``--lf`` and ``-ff`` options to run only the last failing tests or
  "failing tests first" from the last run.  This functionality is provided
  through porting the formerly external pytest-cache plugin into pytest core.
  BACKWARD INCOMPAT: if you used pytest-cache's functionality to persist
  data between test runs be aware that we don't serialize sets anymore.
  Thanks Ronny Pfannschmidt for most of the merging work.

- "-r" option now accepts "a" to include all possible reports, similar
  to passing "fEsxXw" explicitly (isse960).
  Thanks Abhijeet Kasurde for the PR.

- avoid python3.5 deprecation warnings by introducing version
  specific inspection helpers, thanks Michael Droettboom.

- fix issue562: @@nose.tools.istest now fully respected.

- fix issue934: when string comparison fails and a diff is too large to display
  without passing -vv, still show a few lines of the diff.
  Thanks Florian Bruhin for the report and Bruno Oliveira for the PR.

- fix issue736: Fix a bug where fixture params would be discarded when combined
  with parametrization markers.
  Thanks to Markus Unterwaditzer for the PR.

- fix issue710: introduce ALLOW_UNICODE doctest option: when enabled, the
  ``u`` prefix is stripped from unicode strings in expected doctest output. This
  allows doctests which use unicode to run in Python 2 and 3 unchanged.
  Thanks Jason R. Coombs for the report and Bruno Oliveira for the PR.

- parametrize now also generates meaningful test IDs for enum, regex and class
  objects (as opposed to class instances).
  Thanks to Florian Bruhin for the PR.

- Add 'warns' to assert that warnings are thrown (like 'raises').
  Thanks to Eric Hunsberger for the PR.

- Fix issue683: Do not apply an already applied mark.  Thanks ojake for the PR.

- Deal with capturing failures better so fewer exceptions get lost to
  /dev/null.  Thanks David Szotten for the PR.

- fix issue730: deprecate and warn about the --genscript option.
  Thanks Ronny Pfannschmidt for the report and Christian Pommranz for the PR.

- fix issue751: multiple parametrize with ids bug if it parametrizes class with
  two or more test methods. Thanks Sergey Chipiga for reporting and Jan
  Bednarik for PR.

- fix issue82: avoid loading conftest files from setup.cfg/pytest.ini/tox.ini
  files and upwards by default (--confcutdir can still be set to override this).
  Thanks Bruno Oliveira for the PR.

- fix issue768: docstrings found in python modules were not setting up session
  fixtures. Thanks Jason R. Coombs for reporting and Bruno Oliveira for the PR.

- added `tmpdir_factory`, a session-scoped fixture that can be used to create
  directories under the base temporary directory. Previously this object was
  installed as a `_tmpdirhandler` attribute of the `config` object, but now it
  is part of the official API and using `config._tmpdirhandler` is
  deprecated.
  Thanks Bruno Oliveira for the PR.

- fix issue808: pytest's internal assertion rewrite hook now implements the
  optional PEP302 get_data API so tests can access data files next to them.
  Thanks xmo-odoo for request and example and Bruno Oliveira for
  the PR.

- rootdir and inifile are now displayed during usage errors to help
  users diagnose problems such as unexpected ini files which add
  unknown options being picked up by pytest. Thanks to Pavel Savchenko for
  bringing the problem to attention in #821 and Bruno Oliveira for the PR.

- Summary bar now is colored yellow for warning
  situations such as: all tests either were skipped or xpass/xfailed,
  or no tests were run at all (this is a partial fix for issue500).

- fix issue812: pytest now exits with status code 5 in situations where no
  tests were run at all, such as the directory given in the command line does
  not contain any tests or as result of a command line option filters
  all out all tests (-k for example).
  Thanks Eric Siegerman (issue812) and Bruno Oliveira for the PR.

- Summary bar now is colored yellow for warning
  situations such as: all tests either were skipped or xpass/xfailed,
  or no tests were run at all (related to issue500).
  Thanks Eric Siegerman.

- New `testpaths` ini option: list of directories to search for tests
  when executing pytest from the root directory. This can be used
  to speed up test collection when a project has well specified directories
  for tests, being usually more practical than configuring norecursedirs for
  all directories that do not contain tests.
  Thanks to Adrian for idea (#694) and Bruno Oliveira for the PR.

- fix issue713: JUnit XML reports for doctest failures.
  Thanks Punyashloka Biswal.

- fix issue970: internal pytest warnings now appear as "pytest-warnings" in
  the terminal instead of "warnings", so it is clear for users that those
  warnings are from pytest and not from the builtin "warnings" module.
  Thanks Bruno Oliveira.

- Include setup and teardown in junitxml test durations.
  Thanks Janne Vanhala.

- fix issue735: assertion failures on debug versions of Python 3.4+

- new option ``--import-mode`` to allow to change test module importing
  behaviour to append to sys.path instead of prepending.  This better allows
  to run test modules against installated versions of a package even if the
  package under test has the same import root.  In this example::

        testing/__init__.py
        testing/test_pkg_under_test.py
        pkg_under_test/

  the tests will run against the installed version
  of pkg_under_test when ``--import-mode=append`` is used whereas
  by default they would always pick up the local version.  Thanks Holger Krekel.

- pytester: add method ``TmpTestdir.delete_loaded_modules()``, and call it
  from ``inline_run()`` to allow temporary modules to be reloaded.
  Thanks Eduardo Schettino.

- internally refactor pluginmanager API and code so that there
  is a clear distinction between a pytest-agnostic rather simple
  pluginmanager and the PytestPluginManager which adds a lot of
  behaviour, among it handling of the local conftest files.
  In terms of documented methods this is a backward compatible
  change but it might still break 3rd party plugins which relied on
  details like especially the pluginmanager.add_shutdown() API.
  Thanks Holger Krekel.

- pluginmanagement: introduce ``pytest.hookimpl`` and
  ``pytest.hookspec`` decorators for setting impl/spec
  specific parameters.  This substitutes the previous
  now deprecated use of ``pytest.mark`` which is meant to
  contain markers for test functions only.

- write/refine docs for "writing plugins" which now have their
  own page and are separate from the "using/installing plugins`` page.

- fix issue732: properly unregister plugins from any hook calling
  sites allowing to have temporary plugins during test execution.

- deprecate and warn about ``__multicall__`` argument in hook
  implementations.  Use the ``hookwrapper`` mechanism instead already
  introduced with pytest-2.7.

- speed up pytest's own test suite considerably by using inprocess
  tests by default (testrun can be modified with --runpytest=subprocess
  to create subprocesses in many places instead).  The main
  APIs to run pytest in a test is "runpytest()" or "runpytest_subprocess"
  and "runpytest_inprocess" if you need a particular way of running
  the test.  In all cases you get back a RunResult but the inprocess
  one will also have a "reprec" attribute with the recorded events/reports.

- fix monkeypatch.setattr("x.y", raising=False) to actually not raise
  if "y" is not a pre-existing attribute. Thanks Florian Bruhin.

- fix issue741: make running output from testdir.run copy/pasteable
  Thanks Bruno Oliveira.

- add a new ``--noconftest`` argument which ignores all ``conftest.py`` files.

- add ``file`` and ``line`` attributes to JUnit-XML output.

- fix issue890: changed extension of all documentation files from ``txt`` to
  ``rst``. Thanks to Abhijeet for the PR.

- fix issue714: add ability to apply indirect=True parameter on particular argnames.
  Thanks Elizaveta239.

- fix issue890: changed extension of all documentation files from ``txt`` to
  ``rst``. Thanks to Abhijeet for the PR.

- fix issue957: "# doctest: SKIP" option will now register doctests as SKIPPED
  rather than PASSED.
  Thanks Thomas Grainger for the report and Bruno Oliveira for the PR.

- issue951: add new record_xml_property fixture, that supports logging
  additional information on xml output. Thanks David Diaz for the PR.

- issue949: paths after normal options (for example `-s`, `-v`, etc) are now
  properly used to discover `rootdir` and `ini` files.
  Thanks Peter Lauri for the report and Bruno Oliveira for the PR.

2.7.3 (compared to 2.7.2)
-----------------------------

- Allow 'dev', 'rc', or other non-integer version strings in `importorskip`.
  Thanks to Eric Hunsberger for the PR.

- fix issue856: consider --color parameter in all outputs (for example
  --fixtures). Thanks Barney Gale for the report and Bruno Oliveira for the PR.

- fix issue855: passing str objects as `plugins` argument to pytest.main
  is now interpreted as a module name to be imported and registered as a
  plugin, instead of silently having no effect.
  Thanks xmo-odoo for the report and Bruno Oliveira for the PR.

- fix issue744: fix for ast.Call changes in Python 3.5+.  Thanks
  Guido van Rossum, Matthias Bussonnier, Stefan Zimmermann and
  Thomas Kluyver.

- fix issue842: applying markers in classes no longer propagate this markers
  to superclasses which also have markers.
  Thanks xmo-odoo for the report and Bruno Oliveira for the PR.

- preserve warning functions after call to pytest.deprecated_call. Thanks
  Pieter Mulder for PR.

- fix issue854: autouse yield_fixtures defined as class members of
  unittest.TestCase subclasses now work as expected.
  Thannks xmo-odoo for the report and Bruno Oliveira for the PR.

- fix issue833: --fixtures now shows all fixtures of collected test files, instead of just the
  fixtures declared on the first one.
  Thanks Florian Bruhin for reporting and Bruno Oliveira for the PR.

- fix issue863: skipped tests now report the correct reason when a skip/xfail
  condition is met when using multiple markers.
  Thanks Raphael Pierzina for reporting and Bruno Oliveira for the PR.

- optimized tmpdir fixture initialization, which should make test sessions
  faster (specially when using pytest-xdist). The only visible effect
  is that now pytest uses a subdirectory in the $TEMP directory for all
  directories created by this fixture (defaults to $TEMP/pytest-$USER).
  Thanks Bruno Oliveira for the PR.
@
text
@d16 12
a33 6
${PYSITELIB}/_pytest/assertion/newinterpret.py
${PYSITELIB}/_pytest/assertion/newinterpret.pyc
${PYSITELIB}/_pytest/assertion/newinterpret.pyo
${PYSITELIB}/_pytest/assertion/oldinterpret.py
${PYSITELIB}/_pytest/assertion/oldinterpret.pyc
${PYSITELIB}/_pytest/assertion/oldinterpret.pyo
@


1.2
log
@Update to 2.5.2 (leaf package).
Add missing dependencies. Add test dependencies. Replace interpreter
path in installed file.

Changes since 2.3.5:

2.5.2
-----------------------------------

- fix issue409 -- better interoperate with cx_freeze by not
  trying to import from collections.abc which causes problems
  for py27/cx_freeze.  Thanks Wolfgang L. for reporting and tracking it down.

- fixed docs and code to use "pytest" instead of "py.test" almost everywhere.
  Thanks Jurko Gospodnetic for the complete PR.

- fix issue425: mention at end of "py.test -h" that --markers
  and --fixtures work according to specified test path (or current dir)

- fix issue413: exceptions with unicode attributes are now printed
  correctly also on python2 and with pytest-xdist runs. (the fix
  requires py-1.4.20)

- copy, cleanup and integrate py.io capture
  from pylib 1.4.20.dev2 (rev 13d9af95547e)

- address issue416: clarify docs as to conftest.py loading semantics

- fix issue429: comparing byte strings with non-ascii chars in assert
  expressions now work better.  Thanks Floris Bruynooghe.

- make capfd/capsys.capture private, its unused and shouldnt be exposed


2.5.1
-----------------------------------

- merge new documentation styling PR from Tobias Bieniek.

- fix issue403: allow parametrize of multiple same-name functions within
  a collection node.  Thanks Andreas Kloeckner and Alex Gaynor for reporting
  and analysis.

- Allow parameterized fixtures to specify the ID of the parameters by
  adding an ids argument to pytest.fixture() and pytest.yield_fixture().
  Thanks Floris Bruynooghe.

- fix issue404 by always using the binary xml escape in the junitxml
  plugin.  Thanks Ronny Pfannschmidt.

- fix issue407: fix addoption docstring to point to argparse instead of
  optparse. Thanks Daniel D. Wright.



2.5.0
-----------------------------------

- dropped python2.5 from automated release testing of pytest itself
  which means it's probably going to break soon (but still works
  with this release we believe).

- simplified and fixed implementation for calling finalizers when
  parametrized fixtures or function arguments are involved.  finalization
  is now performed lazily at setup time instead of in the "teardown phase".
  While this might sound odd at first, it helps to ensure that we are
  correctly handling setup/teardown even in complex code.  User-level code
  should not be affected unless it's implementing the pytest_runtest_teardown
  hook and expecting certain fixture instances are torn down within (very
  unlikely and would have been unreliable anyway).

- PR90: add --color=yes|no|auto option to force terminal coloring
  mode ("auto" is default).  Thanks Marc Abramowitz.

- fix issue319 - correctly show unicode in assertion errors.  Many
  thanks to Floris Bruynooghe for the complete PR.  Also means
  we depend on py>=1.4.19 now.

- fix issue396 - correctly sort and finalize class-scoped parametrized
  tests independently from number of methods on the class.

- refix issue323 in a better way -- parametrization should now never
  cause Runtime Recursion errors because the underlying algorithm
  for re-ordering tests per-scope/per-fixture is not recursive
  anymore (it was tail-call recursive before which could lead
  to problems for more than >966 non-function scoped parameters).

- fix issue290 - there is preliminary support now for parametrizing
  with repeated same values (sometimes useful to to test if calling
  a second time works as with the first time).

- close issue240 - document precisely how pytest module importing
  works, discuss the two common test directory layouts, and how it
  interacts with PEP420-namespace packages.

- fix issue246 fix finalizer order to be LIFO on independent fixtures
  depending on a parametrized higher-than-function scoped fixture.
  (was quite some effort so please bear with the complexity of this sentence :)
  Thanks Ralph Schmitt for the precise failure example.

- fix issue244 by implementing special index for parameters to only use
  indices for paramentrized test ids

- fix issue287 by running all finalizers but saving the exception
  from the first failing finalizer and re-raising it so teardown will
  still have failed.  We reraise the first failing exception because
  it might be the cause for other finalizers to fail.

- fix ordering when mock.patch or other standard decorator-wrappings
  are used with test methods.  This fixues issue346 and should
  help with random "xdist" collection failures.  Thanks to
  Ronny Pfannschmidt and Donald Stufft for helping to isolate it.

- fix issue357 - special case "-k" expressions to allow for
  filtering with simple strings that are not valid python expressions.
  Examples: "-k 1.3" matches all tests parametrized with 1.3.
  "-k None" filters all tests that have "None" in their name
  and conversely "-k 'not None'".
  Previously these examples would raise syntax errors.

- fix issue384 by removing the trial support code
  since the unittest compat enhancements allow
  trial to handle it on its own

- don't hide an ImportError when importing a plugin produces one.
  fixes issue375.

- fix issue275 - allow usefixtures and autouse fixtures
  for running doctest text files.

- fix issue380 by making --resultlog only rely on longrepr instead
  of the "reprcrash" attribute which only exists sometimes.

- address issue122: allow @@pytest.fixture(params=iterator) by exploding
  into a list early on.

- fix pexpect-3.0 compatibility for pytest's own tests.
  (fixes issue386)

- allow nested parametrize-value markers, thanks James Lan for the PR.

- fix unicode handling with new monkeypatch.setattr(import_path, value)
  API.  Thanks Rob Dennis.  Fixes issue371.

- fix unicode handling with junitxml, fixes issue368.

- In assertion rewriting mode on Python 2, fix the detection of coding
  cookies. See issue #330.

- make "--runxfail" turn imperative pytest.xfail calls into no ops
  (it already did neutralize pytest.mark.xfail markers)

- refine pytest / pkg_resources interactions: The AssertionRewritingHook
  PEP302 compliant loader now registers itself with setuptools/pkg_resources
  properly so that the pkg_resources.resource_stream method works properly.
  Fixes issue366.  Thanks for the investigations and full PR to Jason R. Coombs.

- pytestconfig fixture is now session-scoped as it is the same object during the
  whole test run.  Fixes issue370.

- avoid one surprising case of marker malfunction/confusion::

      @@pytest.mark.some(lambda arg: ...)
      def test_function():

  would not work correctly because pytest assumes @@pytest.mark.some
  gets a function to be decorated already.  We now at least detect if this
  arg is an lambda and thus the example will work.  Thanks Alex Gaynor
  for bringing it up.

- xfail a test on pypy that checks wrong encoding/ascii (pypy does
  not error out). fixes issue385.

- internally make varnames() deal with classes's __init__,
  although it's not needed by pytest itself atm.  Also
  fix caching.  Fixes issue376.

- fix issue221 - handle importing of namespace-package with no
  __init__.py properly.

- refactor internal FixtureRequest handling to avoid monkeypatching.
  One of the positive user-facing effects is that the "request" object
  can now be used in closures.

- fixed version comparison in pytest.importskip(modname, minverstring)

- fix issue377 by clarifying in the nose-compat docs that pytest
  does not duplicate the unittest-API into the "plain" namespace.

- fix verbose reporting for @@mock'd test functions

v2.4.2
-----------------------------------

- on Windows require colorama and a newer py lib so that py.io.TerminalWriter()
  now uses colorama instead of its own ctypes hacks. (fixes issue365)
  thanks Paul Moore for bringing it up.

- fix "-k" matching of tests where "repr" and "attr" and other names would
  cause wrong matches because of an internal implementation quirk
  (don't ask) which is now properly implemented. fixes issue345.

- avoid tmpdir fixture to create too long filenames especially
  when parametrization is used (issue354)

- fix pytest-pep8 and pytest-flakes / pytest interactions
  (collection names in mark plugin was assuming an item always
  has a function which is not true for those plugins etc.)
  Thanks Andi Zeidler.

- introduce node.get_marker/node.add_marker API for plugins
  like pytest-pep8 and pytest-flakes to avoid the messy
  details of the node.keywords  pseudo-dicts.  Adapated
  docs.

- remove attempt to "dup" stdout at startup as it's icky.
  the normal capturing should catch enough possibilities
  of tests messing up standard FDs.

- add pluginmanager.do_configure(config) as a link to
  config.do_configure() for plugin-compatibility

v2.4.1
-----------------------------------

- When using parser.addoption() unicode arguments to the
  "type" keyword should also be converted to the respective types.
  thanks Floris Bruynooghe, @@dnozay. (fixes issue360 and issue362)

- fix dotted filename completion when using argcomplete
  thanks Anthon van der Neuth. (fixes issue361)

- fix regression when a 1-tuple ("arg",) is used for specifying
  parametrization (the values of the parametrization were passed
  nested in a tuple).  Thanks Donald Stufft.

- merge doc typo fixes, thanks Andy Dirnberger

v2.4
-----------------------------------

known incompatibilities:

- if calling --genscript from python2.7 or above, you only get a
  standalone script which works on python2.7 or above.  Use Python2.6
  to also get a python2.5 compatible version.

- all xunit-style teardown methods (nose-style, pytest-style,
  unittest-style) will not be called if the corresponding setup method failed,
  see issue322 below.

- the pytest_plugin_unregister hook wasn't ever properly called
  and there is no known implementation of the hook - so it got removed.

- pytest.fixture-decorated functions cannot be generators (i.e. use
  yield) anymore.  This change might be reversed in 2.4.1 if it causes
  unforeseen real-life issues.  However, you can always write and return
  an inner function/generator and change the fixture consumer to iterate
  over the returned generator.  This change was done in lieu of the new
  ``pytest.yield_fixture`` decorator, see below.

new features:

- experimentally introduce a new ``pytest.yield_fixture`` decorator
  which accepts exactly the same parameters as pytest.fixture but
  mandates a ``yield`` statement instead of a ``return statement`` from
  fixture functions.  This allows direct integration with "with-style"
  context managers in fixture functions and generally avoids registering
  of finalization callbacks in favour of treating the "after-yield" as
  teardown code.  Thanks Andreas Pelme, Vladimir Keleshev, Floris
  Bruynooghe, Ronny Pfannschmidt and many others for discussions.

- allow boolean expression directly with skipif/xfail
  if a "reason" is also specified.  Rework skipping documentation
  to recommend "condition as booleans" because it prevents surprises
  when importing markers between modules.  Specifying conditions
  as strings will remain fully supported.

- reporting: color the last line red or green depending if
  failures/errors occured or everything passed.  thanks Christian
  Theunert.

- make "import pdb ; pdb.set_trace()" work natively wrt capturing (no
  "-s" needed anymore), making ``pytest.set_trace()`` a mere shortcut.

- fix issue181: --pdb now also works on collect errors (and
  on internal errors) .  This was implemented by a slight internal
  refactoring and the introduction of a new hook
  ``pytest_exception_interact`` hook (see next item).

- fix issue341: introduce new experimental hook for IDEs/terminals to
  intercept debugging: ``pytest_exception_interact(node, call, report)``.

- new monkeypatch.setattr() variant to provide a shorter
  invocation for patching out classes/functions from modules:

     monkeypatch.setattr("requests.get", myfunc)

  will replace the "get" function of the "requests" module with ``myfunc``.

- fix issue322: tearDownClass is not run if setUpClass failed. Thanks
  Mathieu Agopian for the initial fix.  Also make all of pytest/nose
  finalizer mimick the same generic behaviour: if a setupX exists and
  fails, don't run teardownX.  This internally introduces a new method
  "node.addfinalizer()" helper which can only be called during the setup
  phase of a node.

- simplify pytest.mark.parametrize() signature: allow to pass a
  CSV-separated string to specify argnames.  For example:
  ``pytest.mark.parametrize("input,expected",  [(1,2), (2,3)])``
  works as well as the previous:
  ``pytest.mark.parametrize(("input", "expected"), ...)``.

- add support for setUpModule/tearDownModule detection, thanks Brian Okken.

- integrate tab-completion on options through use of "argcomplete".
  Thanks Anthon van der Neut for the PR.

- change option names to be hyphen-separated long options but keep the
  old spelling backward compatible.  py.test -h will only show the
  hyphenated version, for example "--collect-only" but "--collectonly"
  will remain valid as well (for backward-compat reasons).  Many thanks to
  Anthon van der Neut for the implementation and to Hynek Schlawack for
  pushing us.

- fix issue 308 - allow to mark/xfail/skip individual parameter sets
  when parametrizing.  Thanks Brianna Laugher.

- call new experimental pytest_load_initial_conftests hook to allow
  3rd party plugins to do something before a conftest is loaded.

Bug fixes:

- fix issue358 - capturing options are now parsed more properly
  by using a new parser.parse_known_args method.

- pytest now uses argparse instead of optparse (thanks Anthon) which
  means that "argparse" is added as a dependency if installing into python2.6
  environments or below.

- fix issue333: fix a case of bad unittest/pytest hook interaction.

- PR27: correctly handle nose.SkipTest during collection.  Thanks
  Antonio Cuni, Ronny Pfannschmidt.

- fix issue355: junitxml puts name="pytest" attribute to testsuite tag.

- fix issue336: autouse fixture in plugins should work again.

- fix issue279: improve object comparisons on assertion failure
  for standard datatypes and recognise collections.abc.  Thanks to
  Brianna Laugher and Mathieu Agopian.

- fix issue317: assertion rewriter support for the is_package method

- fix issue335: document py.code.ExceptionInfo() object returned
  from pytest.raises(), thanks Mathieu Agopian.

- remove implicit distribute_setup support from setup.py.

- fix issue305: ignore any problems when writing pyc files.

- SO-17664702: call fixture finalizers even if the fixture function
  partially failed (finalizers would not always be called before)

- fix issue320 - fix class scope for fixtures when mixed with
  module-level functions.  Thanks Anatloy Bubenkoff.

- you can specify "-q" or "-qq" to get different levels of "quieter"
  reporting (thanks Katarzyna Jachim)

- fix issue300 - Fix order of conftest loading when starting py.test
  in a subdirectory.

- fix issue323 - sorting of many module-scoped arg parametrizations

- make sessionfinish hooks execute with the same cwd-context as at
  session start (helps fix plugin behaviour which write output files
  with relative path such as pytest-cov)

- fix issue316 - properly reference collection hooks in docs

- fix issue 306 - cleanup of -k/-m options to only match markers/test
  names/keywords respectively.  Thanks Wouter van Ackooy.

- improved doctest counting for doctests in python modules --
  files without any doctest items will not show up anymore
  and doctest examples are counted as separate test items.
  thanks Danilo Bellini.

- fix issue245 by depending on the released py-1.4.14
  which fixes py.io.dupfile to work with files with no
  mode. Thanks Jason R. Coombs.

- fix junitxml generation when test output contains control characters,
  addressing issue267, thanks Jaap Broekhuizen

- fix issue338: honor --tb style for setup/teardown errors as well.  Thanks Maho.

- fix issue307 - use yaml.safe_load in example, thanks Mark Eichin.

- better parametrize error messages, thanks Brianna Laugher

- pytest_terminal_summary(terminalreporter) hooks can now use
  ".section(title)" and ".line(msg)" methods to print extra
  information at the end of a test run.
@
text
@d16 3
d37 3
a45 3
${PYSITELIB}/_pytest/core.py
${PYSITELIB}/_pytest/core.pyc
${PYSITELIB}/_pytest/core.pyo
d109 6
@


1.1
log
@add pytest-2.3.5, another Python testing framework
@
text
@d3 7
d13 3
a105 7
${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
${PYSITELIB}/${EGG_INFODIR}/entry_points.txt
${PYSITELIB}/${EGG_INFODIR}/not-zip-safe
${PYSITELIB}/${EGG_INFODIR}/requires.txt
${PYSITELIB}/${EGG_INFODIR}/top_level.txt
@

