Hello community, here is the log from the commit of package python-pytest for openSUSE:Factory checked in at 2018-05-06 14:55:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pytest (Old) and /work/SRC/openSUSE:Factory/.python-pytest.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest" Sun May 6 14:55:08 2018 rev:36 rq:602321 version:3.5.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pytest/python-pytest-doc.changes 2018-04-02 22:48:51.862636453 +0200 +++ /work/SRC/openSUSE:Factory/.python-pytest.new/python-pytest-doc.changes 2018-05-06 14:55:15.358704332 +0200 @@ -1,0 +2,32 @@ +Sat Apr 28 19:38:40 UTC 2018 - a...@gmx.de + +- update to version 3.5.1: + * Bug Fixes + + Reset sys.last_type, sys.last_value and sys.last_traceback + before each test executes. Those attributes are added by pytest + during the test run to aid debugging, but were never reset so + they would create a leaking reference to the last failing test’s + frame which in turn could never be reclaimed by the garbage + collector. (#2798) + + pytest.raises now raises TypeError when receiving an unknown + keyword argument. (#3348) + + pytest.raises now works with exception classes that look like + iterables. (#3372) + * Improved Documentation + + Fix typo in caplog fixture documentation, which incorrectly + identified certain attributes as methods. (#3406) + * Trivial/Internal Changes + + Added a more indicative error message when parametrizing a + function whose argument takes a default value. (#3221) + + Remove internal _pytest.terminal.flatten function in favor of + more_itertools.collapse. (#3330) + + Import some modules from collections.abc instead of collections + as the former modules trigger DeprecationWarning in Python + 3.7. (#3339) + + record_property is no longer experimental, removing the warnings + was forgotten. (#3360) + + Mention in documentation and CLI help that fixtures with leading + _ are printed by pytest --fixtures only if the -v option is + added. (#3398) + +------------------------------------------------------------------- python-pytest.changes: same change Old: ---- pytest-3.5.0.tar.gz New: ---- pytest-3.5.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pytest-doc.spec ++++++ --- /var/tmp/diff_new_pack.thnyIc/_old 2018-05-06 14:55:16.042679239 +0200 +++ /var/tmp/diff_new_pack.thnyIc/_new 2018-05-06 14:55:16.046679091 +0200 @@ -18,12 +18,12 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pytest-doc -Version: 3.5.0 +Version: 3.5.1 Release: 0 Summary: Documentation for python-pytest, a testing tool with autodiscovery License: MIT Group: Documentation/HTML -Url: http://pytest.org +URL: http://pytest.org Source: https://files.pythonhosted.org/packages/source/p/pytest/pytest-%{version}.tar.gz BuildRequires: %{python_module attrs} BuildRequires: %{python_module hypothesis} @@ -34,11 +34,11 @@ BuildRequires: python-rpm-macros BuildRequires: python3-Sphinx BuildRequires: python3-sphinxcontrib-trio +Provides: %{python_module pytest-doc = %{version}} +BuildArch: noarch %ifpython2 BuildRequires: python-funcsigs %endif -Provides: %{python_module pytest-doc = %{version}} -BuildArch: noarch %description This package contains the documentation to pytest, a cross-project Python ++++++ python-pytest.spec ++++++ --- /var/tmp/diff_new_pack.thnyIc/_old 2018-05-06 14:55:16.070678211 +0200 +++ /var/tmp/diff_new_pack.thnyIc/_new 2018-05-06 14:55:16.070678211 +0200 @@ -18,12 +18,12 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pytest -Version: 3.5.0 +Version: 3.5.1 Release: 0 Summary: Python testing tool with autodiscovery and detailed asserts License: MIT Group: Development/Languages/Python -Url: http://pytest.org +URL: http://pytest.org Source: https://files.pythonhosted.org/packages/source/p/pytest/pytest-%{version}.tar.gz BuildRequires: %{python_module setuptools_scm} BuildRequires: fdupes @@ -32,9 +32,9 @@ Requires: python-more-itertools >= 4.0.0 Requires: python-pluggy >= 0.5 Requires: python-py >= 1.5.0 -Requires: python-six >= 1.10.0 #/usr/bin/py.test imports pkg_resources Requires: python-setuptools +Requires: python-six >= 1.10.0 Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch ++++++ pytest-3.5.0.tar.gz -> pytest-3.5.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/AUTHORS new/pytest-3.5.1/AUTHORS --- old/pytest-3.5.0/AUTHORS 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/AUTHORS 2018-04-24 23:37:15.000000000 +0200 @@ -188,6 +188,7 @@ Ted Xiao Thomas Grainger Thomas Hisch +Tim Strazny Tom Dalton Tom Viner Trevor Bekolay diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/CHANGELOG.rst new/pytest-3.5.1/CHANGELOG.rst --- old/pytest-3.5.0/CHANGELOG.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/CHANGELOG.rst 2018-04-24 23:37:15.000000000 +0200 @@ -8,6 +8,58 @@ .. towncrier release notes start +Pytest 3.5.1 (2018-04-23) +========================= + + +Bug Fixes +--------- + +- Reset ``sys.last_type``, ``sys.last_value`` and ``sys.last_traceback`` before + each test executes. Those attributes are added by pytest during the test run + to aid debugging, but were never reset so they would create a leaking + reference to the last failing test's frame which in turn could never be + reclaimed by the garbage collector. (`#2798 + <https://github.com/pytest-dev/pytest/issues/2798>`_) + +- ``pytest.raises`` now raises ``TypeError`` when receiving an unknown keyword + argument. (`#3348 <https://github.com/pytest-dev/pytest/issues/3348>`_) + +- ``pytest.raises`` now works with exception classes that look like iterables. + (`#3372 <https://github.com/pytest-dev/pytest/issues/3372>`_) + + +Improved Documentation +---------------------- + +- Fix typo in ``caplog`` fixture documentation, which incorrectly identified + certain attributes as methods. (`#3406 + <https://github.com/pytest-dev/pytest/issues/3406>`_) + + +Trivial/Internal Changes +------------------------ + +- Added a more indicative error message when parametrizing a function whose + argument takes a default value. (`#3221 + <https://github.com/pytest-dev/pytest/issues/3221>`_) + +- Remove internal ``_pytest.terminal.flatten`` function in favor of + ``more_itertools.collapse``. (`#3330 + <https://github.com/pytest-dev/pytest/issues/3330>`_) + +- Import some modules from ``collections.abc`` instead of ``collections`` as + the former modules trigger ``DeprecationWarning`` in Python 3.7. (`#3339 + <https://github.com/pytest-dev/pytest/issues/3339>`_) + +- record_property is no longer experimental, removing the warnings was + forgotten. (`#3360 <https://github.com/pytest-dev/pytest/issues/3360>`_) + +- Mention in documentation and CLI help that fixtures with leading ``_`` are + printed by ``pytest --fixtures`` only if the ``-v`` option is added. (`#3398 + <https://github.com/pytest-dev/pytest/issues/3398>`_) + + Pytest 3.5.0 (2018-03-21) ========================= @@ -136,7 +188,7 @@ - Internal ``mark.py`` module has been turned into a package. (`#3250 <https://github.com/pytest-dev/pytest/issues/3250>`_) -- ``pytest`` now depends on the `more_itertools +- ``pytest`` now depends on the `more-itertools <https://github.com/erikrose/more-itertools>`_ package. (`#3265 <https://github.com/pytest-dev/pytest/issues/3265>`_) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/CONTRIBUTING.rst new/pytest-3.5.1/CONTRIBUTING.rst --- old/pytest-3.5.0/CONTRIBUTING.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/CONTRIBUTING.rst 2018-04-24 23:37:15.000000000 +0200 @@ -48,8 +48,7 @@ Fix bugs -------- -Look through the GitHub issues for bugs. Here is a filter you can use: -https://github.com/pytest-dev/pytest/labels/type%3A%20bug +Look through the `GitHub issues for bugs <https://github.com/pytest-dev/pytest/labels/type:%20bug>`_. :ref:`Talk <contact>` to developers to find out how you can fix specific bugs. @@ -60,8 +59,7 @@ Implement features ------------------ -Look through the GitHub issues for enhancements. Here is a filter you can use: -https://github.com/pytest-dev/pytest/labels/enhancement +Look through the `GitHub issues for enhancements <https://github.com/pytest-dev/pytest/labels/type:%20enhancement>`_. :ref:`Talk <contact>` to developers to find out how you can implement specific features. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/PKG-INFO new/pytest-3.5.1/PKG-INFO --- old/pytest-3.5.0/PKG-INFO 2018-03-23 00:47:53.000000000 +0100 +++ new/pytest-3.5.1/PKG-INFO 2018-04-24 23:37:41.000000000 +0200 @@ -1,10 +1,12 @@ Metadata-Version: 1.2 Name: pytest -Version: 3.5.0 +Version: 3.5.1 Summary: pytest: simple powerful testing with Python Home-page: http://pytest.org Author: Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin and others License: MIT license +Project-URL: Source, https://github.com/pytest-dev/pytest +Project-URL: Tracker, https://github.com/pytest-dev/pytest/issues Description: .. image:: http://docs.pytest.org/en/latest/_static/pytest1.png :target: http://docs.pytest.org :align: center diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/_pytest/_version.py new/pytest-3.5.1/_pytest/_version.py --- old/pytest-3.5.0/_pytest/_version.py 2018-03-23 00:47:53.000000000 +0100 +++ new/pytest-3.5.1/_pytest/_version.py 2018-04-24 23:37:41.000000000 +0200 @@ -1,4 +1,4 @@ # coding: utf-8 # file generated by setuptools_scm # don't change, don't track in version control -version = '3.5.0' +version = '3.5.1' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/_pytest/assertion/util.py new/pytest-3.5.1/_pytest/assertion/util.py --- old/pytest-3.5.0/_pytest/assertion/util.py 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/_pytest/assertion/util.py 2018-04-24 23:37:15.000000000 +0200 @@ -5,7 +5,7 @@ import _pytest._code import py import six -from collections import Sequence +from ..compat import Sequence u = six.text_type diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/_pytest/compat.py new/pytest-3.5.1/_pytest/compat.py --- old/pytest-3.5.0/_pytest/compat.py 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/_pytest/compat.py 2018-04-24 23:37:15.000000000 +0200 @@ -38,6 +38,14 @@ PY36 = sys.version_info[:2] >= (3, 6) MODULE_NOT_FOUND_ERROR = 'ModuleNotFoundError' if PY36 else 'ImportError' +if _PY3: + from collections.abc import MutableMapping as MappingMixin # noqa + from collections.abc import Sequence # noqa +else: + # those raise DeprecationWarnings in Python >=3.7 + from collections import MutableMapping as MappingMixin # noqa + from collections import Sequence # noqa + def _format_args(func): return str(signature(func)) @@ -127,6 +135,14 @@ return arg_names +def get_default_arg_names(function): + # Note: this code intentionally mirrors the code at the beginning of getfuncargnames, + # to get the arguments which were excluded from its result because they had default values + return tuple(p.name for p in signature(function).parameters.values() + if p.kind in (Parameter.POSITIONAL_OR_KEYWORD, Parameter.KEYWORD_ONLY) and + p.default is not Parameter.empty) + + if _PY3: STRING_TYPES = bytes, str UNICODE_TYPES = str, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/_pytest/helpconfig.py new/pytest-3.5.1/_pytest/helpconfig.py --- old/pytest-3.5.0/_pytest/helpconfig.py 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/_pytest/helpconfig.py 2018-04-24 23:37:15.000000000 +0200 @@ -138,7 +138,8 @@ tw.line("to see available markers type: pytest --markers") tw.line("to see available fixtures type: pytest --fixtures") tw.line("(shown according to specified file_or_dir or current dir " - "if not specified)") + "if not specified; fixtures with leading '_' are only shown " + "with the '-v' option") for warningreport in reporter.stats.get('warnings', []): tw.line("warning : " + warningreport.message, red=True) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/_pytest/hookspec.py new/pytest-3.5.1/_pytest/hookspec.py --- old/pytest-3.5.0/_pytest/hookspec.py 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/_pytest/hookspec.py 2018-04-24 23:37:15.000000000 +0200 @@ -413,14 +413,15 @@ def pytest_sessionstart(session): - """ before session.main() is called. + """ called after the ``Session`` object has been created and before performing collection + and entering the run test loop. :param _pytest.main.Session session: the pytest session object """ def pytest_sessionfinish(session, exitstatus): - """ whole test run finishes. + """ called after whole test run finished, right before returning the exit status to the system. :param _pytest.main.Session session: the pytest session object :param int exitstatus: the status which pytest will return to the system diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/_pytest/junitxml.py new/pytest-3.5.1/_pytest/junitxml.py --- old/pytest-3.5.0/_pytest/junitxml.py 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/_pytest/junitxml.py 2018-04-24 23:37:15.000000000 +0200 @@ -245,11 +245,6 @@ def test_function(record_property): record_property("example_key", 1) """ - request.node.warn( - code='C3', - message='record_property is an experimental feature', - ) - def append_property(name, value): request.node.user_properties.append((name, value)) return append_property diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/_pytest/logging.py new/pytest-3.5.1/_pytest/logging.py --- old/pytest-3.5.0/_pytest/logging.py 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/_pytest/logging.py 2018-04-24 23:37:15.000000000 +0200 @@ -289,9 +289,9 @@ Captured logs are available through the following methods:: - * caplog.text() -> string containing formatted log output - * caplog.records() -> list of logging.LogRecord instances - * caplog.record_tuples() -> list of (logger_name, level, message) tuples + * caplog.text -> string containing formatted log output + * caplog.records -> list of logging.LogRecord instances + * caplog.record_tuples -> list of (logger_name, level, message) tuples * caplog.clear() -> clear captured records and formatted log output string """ result = LogCaptureFixture(request.node) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/_pytest/main.py new/pytest-3.5.1/_pytest/main.py --- old/pytest-3.5.0/_pytest/main.py 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/_pytest/main.py 2018-04-24 23:37:15.000000000 +0200 @@ -333,7 +333,7 @@ def gethookproxy(self, fspath): # check if we have the common case of running - # hooks with all conftest.py filesall conftest.py + # hooks with all conftest.py files pm = self.config.pluginmanager my_conftestmodules = pm._getconftestmodules(fspath) remove_mods = pm._conftest_plugins.difference(my_conftestmodules) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/_pytest/mark/__init__.py new/pytest-3.5.1/_pytest/mark/__init__.py --- old/pytest-3.5.0/_pytest/mark/__init__.py 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/_pytest/mark/__init__.py 2018-04-24 23:37:15.000000000 +0200 @@ -20,7 +20,8 @@ def param(*values, **kw): - """Specify a parameter in a `pytest.mark.parametrize`_ call. + """Specify a parameter in `pytest.mark.parametrize`_ calls or + :ref:`parametrized fixtures <fixture-parametrize-marks>`. .. code-block:: python diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/_pytest/mark/structures.py new/pytest-3.5.1/_pytest/mark/structures.py --- old/pytest-3.5.0/_pytest/mark/structures.py 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/_pytest/mark/structures.py 2018-04-24 23:37:15.000000000 +0200 @@ -1,13 +1,13 @@ -from collections import namedtuple, MutableMapping as MappingMixin +import inspect import warnings +from collections import namedtuple from operator import attrgetter -import inspect import attr -from ..deprecated import MARK_PARAMETERSET_UNPACKING -from ..compat import NOTSET, getfslineno from six.moves import map +from ..compat import NOTSET, getfslineno, MappingMixin +from ..deprecated import MARK_PARAMETERSET_UNPACKING EMPTY_PARAMETERSET_OPTION = "empty_parameter_set_mark" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/_pytest/python.py new/pytest-3.5.1/_pytest/python.py --- old/pytest-3.5.0/_pytest/python.py 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/_pytest/python.py 2018-04-24 23:37:15.000000000 +0200 @@ -25,7 +25,7 @@ isclass, isfunction, is_generator, ascii_escaped, REGEX_TYPE, STRING_TYPES, NoneType, NOTSET, get_real_func, getfslineno, safe_getattr, - safe_str, getlocation, enum, + safe_str, getlocation, enum, get_default_arg_names ) from _pytest.outcomes import fail from _pytest.mark.structures import transfer_markers @@ -75,7 +75,8 @@ group = parser.getgroup("general") group.addoption('--fixtures', '--funcargs', action="store_true", dest="showfixtures", default=False, - help="show available fixtures, sorted by plugin appearance") + help="show available fixtures, sorted by plugin appearance " + "(fixtures with leading '_' are only shown with '-v')") group.addoption( '--fixtures-per-test', action="store_true", @@ -789,6 +790,7 @@ argnames, parameters = ParameterSet._for_parametrize( argnames, argvalues, self.function, self.config) del argvalues + default_arg_names = set(get_default_arg_names(self.function)) if scope is None: scope = _find_parametrized_scope(argnames, self._arg2fixturedefs, indirect) @@ -797,13 +799,16 @@ valtypes = {} for arg in argnames: if arg not in self.fixturenames: - if isinstance(indirect, (tuple, list)): - name = 'fixture' if arg in indirect else 'argument' + if arg in default_arg_names: + raise ValueError("%r already takes an argument %r with a default value" % (self.function, arg)) else: - name = 'fixture' if indirect else 'argument' - raise ValueError( - "%r uses no %s %r" % ( - self.function, name, arg)) + if isinstance(indirect, (tuple, list)): + name = 'fixture' if arg in indirect else 'argument' + else: + name = 'fixture' if indirect else 'argument' + raise ValueError( + "%r uses no %s %r" % ( + self.function, name, arg)) if indirect is True: valtypes = dict.fromkeys(argnames, "params") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/_pytest/python_api.py new/pytest-3.5.1/_pytest/python_api.py --- old/pytest-3.5.0/_pytest/python_api.py 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/_pytest/python_api.py 2018-04-24 23:37:15.000000000 +0200 @@ -2,6 +2,7 @@ import sys import py +from six import binary_type, text_type from six.moves import zip, filterfalse from more_itertools.more import always_iterable @@ -584,7 +585,8 @@ """ __tracebackhide__ = True - for exc in filterfalse(isclass, always_iterable(expected_exception)): + base_type = (type, text_type, binary_type) + for exc in filterfalse(isclass, always_iterable(expected_exception, base_type)): msg = ("exceptions must be old-style classes or" " derived from BaseException, not %s") raise TypeError(msg % type(exc)) @@ -597,6 +599,10 @@ message = kwargs.pop("message") if "match" in kwargs: match_expr = kwargs.pop("match") + if kwargs: + msg = 'Unexpected keyword arguments passed to pytest.raises: ' + msg += ', '.join(kwargs.keys()) + raise TypeError(msg) return RaisesContext(expected_exception, message, match_expr) elif isinstance(args[0], str): code, = args diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/_pytest/runner.py new/pytest-3.5.1/_pytest/runner.py --- old/pytest-3.5.0/_pytest/runner.py 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/_pytest/runner.py 2018-04-24 23:37:15.000000000 +0200 @@ -105,6 +105,7 @@ def pytest_runtest_call(item): _update_current_test_var(item, 'call') + sys.last_type, sys.last_value, sys.last_traceback = (None, None, None) try: item.runtest() except Exception: @@ -114,7 +115,7 @@ sys.last_type = type sys.last_value = value sys.last_traceback = tb - del tb # Get rid of it in this namespace + del type, value, tb # Get rid of these in this frame raise diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/_pytest/terminal.py new/pytest-3.5.1/_pytest/terminal.py --- old/pytest-3.5.0/_pytest/terminal.py 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/_pytest/terminal.py 2018-04-24 23:37:15.000000000 +0200 @@ -12,6 +12,7 @@ import pluggy import py import six +from more_itertools import collapse import pytest from _pytest import nodes @@ -442,7 +443,7 @@ def _write_report_lines_from_hooks(self, lines): lines.reverse() - for line in flatten(lines): + for line in collapse(lines): self.write_line(line) def pytest_report_header(self, config): @@ -700,15 +701,6 @@ return str(v) -def flatten(values): - for x in values: - if isinstance(x, (list, tuple)): - for y in flatten(x): - yield y - else: - yield x - - def build_summary_stats_line(stats): keys = ("failed passed skipped deselected " "xfailed xpassed warnings error").split() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/1478.feature new/pytest-3.5.1/changelog/1478.feature --- old/pytest-3.5.0/changelog/1478.feature 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/1478.feature 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -New ``--show-capture`` command-line option that allows to specify how to display captured output when tests fail: ``no``, ``stdout``, ``stderr``, ``log`` or ``all`` (the default). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/1642.feature.rst new/pytest-3.5.1/changelog/1642.feature.rst --- old/pytest-3.5.0/changelog/1642.feature.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/1642.feature.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -New ``--rootdir`` command-line option to override the rules for discovering the root directory. See `customize <https://docs.pytest.org/en/latest/customize.html>`_ in the documentation for details. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/1713.doc.rst new/pytest-3.5.1/changelog/1713.doc.rst --- old/pytest-3.5.0/changelog/1713.doc.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/1713.doc.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Added a `reference <https://docs.pytest.org/en/latest/reference.html>`_ page to the docs. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/2370.bugfix.rst new/pytest-3.5.1/changelog/2370.bugfix.rst --- old/pytest-3.5.0/changelog/2370.bugfix.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/2370.bugfix.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Suppress ``IOError`` when closing the temporary file used for capturing streams in Python 2.7. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/2405.feature.rst new/pytest-3.5.1/changelog/2405.feature.rst --- old/pytest-3.5.0/changelog/2405.feature.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/2405.feature.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Fixtures are now instantiated based on their scopes, with higher-scoped fixtures (such as ``session``) being instantiated first than lower-scoped fixtures (such as ``function``). The relative order of fixtures of the same scope is kept unchanged, based in their declaration order and their dependencies. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/2770.feature new/pytest-3.5.1/changelog/2770.feature --- old/pytest-3.5.0/changelog/2770.feature 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/2770.feature 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -``record_xml_property`` renamed to ``record_property`` and is now compatible with xdist, markers and any reporter. -``record_xml_property`` name is now deprecated. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/2770.removal.rst new/pytest-3.5.1/changelog/2770.removal.rst --- old/pytest-3.5.0/changelog/2770.removal.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/2770.removal.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -``record_xml_property`` fixture is now deprecated in favor of the more generic ``record_property``. \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/2798.bugfix.rst new/pytest-3.5.1/changelog/2798.bugfix.rst --- old/pytest-3.5.0/changelog/2798.bugfix.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/pytest-3.5.1/changelog/2798.bugfix.rst 2018-04-24 23:37:15.000000000 +0200 @@ -0,0 +1,3 @@ +Reset ``sys.last_type``, ``sys.last_value`` and ``sys.last_traceback`` before each test executes. Those attributes +are added by pytest during the test run to aid debugging, but were never reset so they would create a leaking +reference to the last failing test's frame which in turn could never be reclaimed by the garbage collector. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3034.feature new/pytest-3.5.1/changelog/3034.feature --- old/pytest-3.5.0/changelog/3034.feature 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3034.feature 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3084.removal new/pytest-3.5.1/changelog/3084.removal --- old/pytest-3.5.0/changelog/3084.removal 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3084.removal 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Defining ``pytest_plugins`` is now deprecated in non-top-level conftest.py files, because they "leak" to the entire directory tree. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3139.feature new/pytest-3.5.1/changelog/3139.feature --- old/pytest-3.5.0/changelog/3139.feature 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3139.feature 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -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 (or no cache was found): ``none`` or ``all`` (the default). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3149.feature new/pytest-3.5.1/changelog/3149.feature --- old/pytest-3.5.0/changelog/3149.feature 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3149.feature 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3156.feature new/pytest-3.5.1/changelog/3156.feature --- old/pytest-3.5.0/changelog/3156.feature 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3156.feature 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3189.feature new/pytest-3.5.1/changelog/3189.feature --- old/pytest-3.5.0/changelog/3189.feature 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3189.feature 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Allow the logging plugin to handle ``pytest_runtest_logstart`` and ``pytest_runtest_logfinish`` hooks when live logs are enabled. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3190.feature new/pytest-3.5.1/changelog/3190.feature --- old/pytest-3.5.0/changelog/3190.feature 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3190.feature 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Passing `--log-cli-level` in the command-line now automatically activates live logging. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3198.feature.rst new/pytest-3.5.1/changelog/3198.feature.rst --- old/pytest-3.5.0/changelog/3198.feature.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3198.feature.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Add command line option ``--deselect`` to allow deselection of individual tests at collection time. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3204.feature new/pytest-3.5.1/changelog/3204.feature --- old/pytest-3.5.0/changelog/3204.feature 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3204.feature 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Captured logs are printed before entering pdb. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3213.feature new/pytest-3.5.1/changelog/3213.feature --- old/pytest-3.5.0/changelog/3213.feature 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3213.feature 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Deselected item count is now shown before tests are run, e.g. ``collected X items / Y deselected``. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3221.feature new/pytest-3.5.1/changelog/3221.feature --- old/pytest-3.5.0/changelog/3221.feature 1970-01-01 01:00:00.000000000 +0100 +++ new/pytest-3.5.1/changelog/3221.feature 2018-04-24 23:37:15.000000000 +0200 @@ -0,0 +1 @@ +Added a more indicative error message when parametrizing a function whose argument takes a default value. \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3228.trivial.rst new/pytest-3.5.1/changelog/3228.trivial.rst --- old/pytest-3.5.0/changelog/3228.trivial.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3228.trivial.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Change minimum requirement of ``attrs`` to ``17.4.0``. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3236.feature.rst new/pytest-3.5.1/changelog/3236.feature.rst --- old/pytest-3.5.0/changelog/3236.feature.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3236.feature.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -The builtin module ``platform`` is now available for use in expressions in ``pytest.mark``. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3245.trivial.rst new/pytest-3.5.1/changelog/3245.trivial.rst --- old/pytest-3.5.0/changelog/3245.trivial.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3245.trivial.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Renamed example directories so all tests pass when ran from the base directory. \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3246.trival.rst new/pytest-3.5.1/changelog/3246.trival.rst --- old/pytest-3.5.0/changelog/3246.trival.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3246.trival.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Remove usage of deprecated ``metafunc.addcall`` in our own tests. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3250.trivial.rst new/pytest-3.5.1/changelog/3250.trivial.rst --- old/pytest-3.5.0/changelog/3250.trivial.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3250.trivial.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Internal ``mark.py`` module has been turned into a package. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3255.feature.rst new/pytest-3.5.1/changelog/3255.feature.rst --- old/pytest-3.5.0/changelog/3255.feature.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3255.feature.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -The *short test summary info* section now is displayed after tracebacks and warnings in the terminal. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3265.trivial.rst new/pytest-3.5.1/changelog/3265.trivial.rst --- old/pytest-3.5.0/changelog/3265.trivial.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3265.trivial.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -``pytest`` now depends on the `more_itertools <https://github.com/erikrose/more-itertools>`_ package. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3268.trivial new/pytest-3.5.1/changelog/3268.trivial --- old/pytest-3.5.0/changelog/3268.trivial 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3268.trivial 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Added warning when ``[pytest]`` section is used in a ``.cfg`` file passed with ``-c`` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3291.trivial.rst new/pytest-3.5.1/changelog/3291.trivial.rst --- old/pytest-3.5.0/changelog/3291.trivial.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3291.trivial.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -``nodeids`` can now be passed explicitly to ``FSCollector`` and ``Node`` constructors. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3292.trivial.rst new/pytest-3.5.1/changelog/3292.trivial.rst --- old/pytest-3.5.0/changelog/3292.trivial.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3292.trivial.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Internal refactoring of ``FormattedExcinfo`` to use ``attrs`` facilities and remove old support code for legacy Python versions. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3296.feature new/pytest-3.5.1/changelog/3296.feature --- old/pytest-3.5.0/changelog/3296.feature 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3296.feature 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -New ``--verbosity`` flag to set verbosity level explicitly. \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3296.trivial new/pytest-3.5.1/changelog/3296.trivial --- old/pytest-3.5.0/changelog/3296.trivial 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3296.trivial 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Refactoring to unify how verbosity is handled internally. \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3297.bugfix.rst new/pytest-3.5.1/changelog/3297.bugfix.rst --- old/pytest-3.5.0/changelog/3297.bugfix.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3297.bugfix.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -Fixed ``clear()`` method on ``caplog`` fixture which cleared ``records``, -but not the ``text`` property. \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3304.trivial new/pytest-3.5.1/changelog/3304.trivial --- old/pytest-3.5.0/changelog/3304.trivial 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3304.trivial 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Internal refactoring to better integrate with argparse. \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3308.trivial.rst new/pytest-3.5.1/changelog/3308.trivial.rst --- old/pytest-3.5.0/changelog/3308.trivial.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3308.trivial.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -Fix a python example when calling a fixture in doc/en/usage.rst diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3312.feature new/pytest-3.5.1/changelog/3312.feature --- old/pytest-3.5.0/changelog/3312.feature 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3312.feature 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -``pytest.approx`` now accepts comparing a numpy array with a scalar. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3314.bugfix.rst new/pytest-3.5.1/changelog/3314.bugfix.rst --- old/pytest-3.5.0/changelog/3314.bugfix.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/changelog/3314.bugfix.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3330.trivial.rst new/pytest-3.5.1/changelog/3330.trivial.rst --- old/pytest-3.5.0/changelog/3330.trivial.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/pytest-3.5.1/changelog/3330.trivial.rst 2018-04-24 23:37:15.000000000 +0200 @@ -0,0 +1 @@ +Remove internal ``_pytest.terminal.flatten`` function in favor of ``more_itertools.collapse``. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3339.trivial new/pytest-3.5.1/changelog/3339.trivial --- old/pytest-3.5.0/changelog/3339.trivial 1970-01-01 01:00:00.000000000 +0100 +++ new/pytest-3.5.1/changelog/3339.trivial 2018-04-24 23:37:15.000000000 +0200 @@ -0,0 +1 @@ +Import some modules from ``collections`` instead of ``collections.abc`` as the former modules trigger ``DeprecationWarning`` in Python 3.7. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3348.bugfix.rst new/pytest-3.5.1/changelog/3348.bugfix.rst --- old/pytest-3.5.0/changelog/3348.bugfix.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/pytest-3.5.1/changelog/3348.bugfix.rst 2018-04-24 23:37:15.000000000 +0200 @@ -0,0 +1 @@ +``pytest.raises`` now raises ``TypeError`` when receiving an unknown keyword argument. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3360.trivial new/pytest-3.5.1/changelog/3360.trivial --- old/pytest-3.5.0/changelog/3360.trivial 1970-01-01 01:00:00.000000000 +0100 +++ new/pytest-3.5.1/changelog/3360.trivial 2018-04-24 23:37:15.000000000 +0200 @@ -0,0 +1,2 @@ +record_property is no longer experimental, removing the warnings was forgotten. + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3372.bugfix.rst new/pytest-3.5.1/changelog/3372.bugfix.rst --- old/pytest-3.5.0/changelog/3372.bugfix.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/pytest-3.5.1/changelog/3372.bugfix.rst 2018-04-24 23:37:15.000000000 +0200 @@ -0,0 +1 @@ +``pytest.raises`` now works with exception classes that look like iterables. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3398.trivial.rst new/pytest-3.5.1/changelog/3398.trivial.rst --- old/pytest-3.5.0/changelog/3398.trivial.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/pytest-3.5.1/changelog/3398.trivial.rst 2018-04-24 23:37:15.000000000 +0200 @@ -0,0 +1 @@ +Mention in documentation and CLI help that fixtures with leading ``_`` are printed by ``pytest --fixtures`` only if the ``-v`` option is added. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/changelog/3406.doc.rst new/pytest-3.5.1/changelog/3406.doc.rst --- old/pytest-3.5.0/changelog/3406.doc.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/pytest-3.5.1/changelog/3406.doc.rst 2018-04-24 23:37:15.000000000 +0200 @@ -0,0 +1 @@ +Fix typo in ``caplog`` fixture documentation, which incorrectly identified certain attributes as methods. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/doc/en/announce/index.rst new/pytest-3.5.1/doc/en/announce/index.rst --- old/pytest-3.5.0/doc/en/announce/index.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/doc/en/announce/index.rst 2018-04-24 23:37:15.000000000 +0200 @@ -6,6 +6,7 @@ :maxdepth: 2 + release-3.5.1 release-3.5.0 release-3.4.2 release-3.4.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/doc/en/announce/release-3.5.1.rst new/pytest-3.5.1/doc/en/announce/release-3.5.1.rst --- old/pytest-3.5.0/doc/en/announce/release-3.5.1.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/pytest-3.5.1/doc/en/announce/release-3.5.1.rst 2018-04-24 23:37:15.000000000 +0200 @@ -0,0 +1,30 @@ +pytest-3.5.1 +======================================= + +pytest 3.5.1 has just been released to PyPI. + +This is a bug-fix release, being a drop-in replacement. To upgrade:: + + pip install --upgrade pytest + +The full changelog is available at http://doc.pytest.org/en/latest/changelog.html. + +Thanks to all who contributed to this release, among them: + +* Brian Maissy +* Bruno Oliveira +* Darren Burns +* David Chudzicki +* Floris Bruynooghe +* Holger Kohr +* Irmen de Jong +* Jeffrey Rackauckas +* Rachel Kogan +* Ronny Pfannschmidt +* Stefan Scherfke +* Tim Strazny +* Семён Марьясин + + +Happy testing, +The pytest Development Team diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/doc/en/builtin.rst new/pytest-3.5.1/doc/en/builtin.rst --- old/pytest-3.5.0/doc/en/builtin.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/doc/en/builtin.rst 2018-04-24 23:37:15.000000000 +0200 @@ -12,7 +12,7 @@ For information on the ``pytest.mark`` mechanism, see :ref:`mark`. -For information about fixtures, see :ref:`fixtures`. To see a complete list of available fixtures, type:: +For information about fixtures, see :ref:`fixtures`. To see a complete list of available fixtures (add ``-v`` to also see fixtures with leading ``_``), type :: $ pytest -q --fixtures cache @@ -77,9 +77,9 @@ Captured logs are available through the following methods:: - * caplog.text() -> string containing formatted log output - * caplog.records() -> list of logging.LogRecord instances - * caplog.record_tuples() -> list of (logger_name, level, message) tuples + * caplog.text -> string containing formatted log output + * caplog.records -> list of logging.LogRecord instances + * caplog.record_tuples -> list of (logger_name, level, message) tuples * caplog.clear() -> clear captured records and formatted log output string monkeypatch The returned ``monkeypatch`` fixture provides these diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/doc/en/development_guide.rst new/pytest-3.5.1/doc/en/development_guide.rst --- old/pytest-3.5.0/doc/en/development_guide.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/doc/en/development_guide.rst 2018-04-24 23:37:15.000000000 +0200 @@ -2,7 +2,7 @@ Development Guide ================= -Some general guidelines regarding development in pytest for core maintainers and general contributors. Nothing here +Some general guidelines regarding development in pytest for maintainers and contributors. Nothing here is set in stone and can't be changed, feel free to suggest improvements or changes in the workflow. @@ -37,72 +37,19 @@ GitHub issues should use labels to categorize them. Labels should be created sporadically, to fill a niche; we should avoid creating labels just for the sake of creating them. -Here is a list of labels and a brief description mentioning their intent. +Each label should include a description in the GitHub's interface stating its purpose. +Temporary labels +~~~~~~~~~~~~~~~~ -**Type** +To classify issues for a special event it is encouraged to create a temporary label. This helps those involved to find +the relevant issues to work on. Examples of that are sprints in Python events or global hacking events. -* ``type: backward compatibility``: issue that will cause problems with old pytest versions. -* ``type: bug``: problem that needs to be addressed. -* ``type: deprecation``: feature that will be deprecated in the future. -* ``type: docs``: documentation missing or needing clarification. -* ``type: enhancement``: new feature or API change, should be merged into ``features``. -* ``type: feature-branch``: new feature or API change, should be merged into ``features``. -* ``type: infrastructure``: improvement to development/releases/CI structure. -* ``type: performance``: performance or memory problem/improvement. -* ``type: proposal``: proposal for a new feature, often to gather opinions or design the API around the new feature. -* ``type: question``: question regarding usage, installation, internals or how to test something. -* ``type: refactoring``: internal improvements to the code. -* ``type: regression``: indicates a problem that was introduced in a release which was working previously. - -**Status** - -* ``status: critical``: grave problem or usability issue that affects lots of users. -* ``status: easy``: easy issue that is friendly to new contributors. -* ``status: help wanted``: core developers need help from experts on this topic. -* ``status: needs information``: reporter needs to provide more information; can be closed after 2 or more weeks of inactivity. - -**Topic** - -* ``topic: collection`` -* ``topic: fixtures`` -* ``topic: parametrize`` -* ``topic: reporting`` -* ``topic: selection`` -* ``topic: tracebacks`` - -**Plugin (internal or external)** - -* ``plugin: cache`` -* ``plugin: capture`` -* ``plugin: doctests`` -* ``plugin: junitxml`` -* ``plugin: monkeypatch`` -* ``plugin: nose`` -* ``plugin: pastebin`` -* ``plugin: pytester`` -* ``plugin: tmpdir`` -* ``plugin: unittest`` -* ``plugin: warnings`` -* ``plugin: xdist`` - - -**OS** - -Issues specific to a single operating system. Do not use as a means to indicate where an issue originated from, only -for problems that happen **only** in that system. - -* ``os: linux`` -* ``os: mac`` -* ``os: windows`` +* ``temporary: EP2017 sprint``: candidate issues or PRs tackled during the EuroPython 2017 -**Temporary** +Issues created at those events should have other relevant labels added as well. -Used to classify issues for limited time, to help find issues related in events for example. -They should be removed after they are no longer relevant. - -* ``temporary: EP2017 sprint``: -* ``temporary: sprint-candidate``: +Those labels should be removed after they are no longer relevant. .. include:: ../../HOWTORELEASE.rst diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/doc/en/example/reportingdemo.rst new/pytest-3.5.1/doc/en/example/reportingdemo.rst --- old/pytest-3.5.0/doc/en/example/reportingdemo.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/doc/en/example/reportingdemo.rst 2018-04-24 23:37:15.000000000 +0200 @@ -358,7 +358,7 @@ > int(s) E ValueError: invalid literal for int() with base 10: 'qwe' - <0-codegen $PYTHON_PREFIX/lib/python3.5/site-packages/_pytest/python_api.py:609>:1: ValueError + <0-codegen $PYTHON_PREFIX/lib/python3.5/site-packages/_pytest/python_api.py:615>:1: ValueError ______________________ TestRaises.test_raises_doesnt _______________________ self = <failure_demo.TestRaises object at 0xdeadbeef> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/doc/en/example/simple.rst new/pytest-3.5.1/doc/en/example/simple.rst --- old/pytest-3.5.0/doc/en/example/simple.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/doc/en/example/simple.rst 2018-04-24 23:37:15.000000000 +0200 @@ -389,7 +389,7 @@ ========================= slowest 3 test durations ========================= 0.30s call test_some_are_slow.py::test_funcslow2 0.20s call test_some_are_slow.py::test_funcslow1 - 0.16s call test_some_are_slow.py::test_funcfast + 0.10s call test_some_are_slow.py::test_funcfast ========================= 3 passed in 0.12 seconds ========================= incremental testing - test steps diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/doc/en/fixture.rst new/pytest-3.5.1/doc/en/fixture.rst --- old/pytest-3.5.0/doc/en/fixture.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/doc/en/fixture.rst 2018-04-24 23:37:15.000000000 +0200 @@ -111,11 +111,11 @@ .. note:: - You can always issue:: + You can always issue :: pytest --fixtures test_simplefactory.py - to see available fixtures. + to see available fixtures (fixtures with leading ``_`` are only shown if you add the ``-v`` option). Fixtures: a prime example of dependency injection --------------------------------------------------- @@ -141,7 +141,7 @@ fixture functions starts at test classes, then test modules, then ``conftest.py`` files and finally builtin and third party plugins. -You can also use the ``conftest.py`` file to implement +You can also use the ``conftest.py`` file to implement :ref:`local per-directory plugins <conftest.py plugins>`. Sharing test data @@ -294,7 +294,7 @@ 1. ``s1``: is the highest-scoped fixture (``session``). 2. ``m1``: is the second highest-scoped fixture (``module``). -3. ``tempdir``: is a ``function``-scoped fixture, required by ``f1``: it needs to be instantiated at this point +3. ``tmpdir``: is a ``function``-scoped fixture, required by ``f1``: it needs to be instantiated at this point because it is a dependency of ``f1``. 4. ``f1``: is the first ``function``-scoped fixture in ``test_foo`` parameter list. 5. ``f2``: is the last ``function``-scoped fixture in ``test_foo`` parameter list. @@ -623,6 +623,40 @@ ======================= no tests ran in 0.12 seconds ======================= +.. _`fixture-parametrize-marks`: + +Using marks with parametrized fixtures +-------------------------------------- + +:func:`pytest.param` can be used to apply marks in values sets of parametrized fixtures in the same way +that they can be used with :ref:`@pytest.mark.parametrize <@pytest.mark.parametrize>`. + +Example:: + + # content of test_fixture_marks.py + import pytest + @pytest.fixture(params=[0, 1, pytest.param(2, marks=pytest.mark.skip)]) + def data_set(request): + return request.param + + def test_data(data_set): + pass + +Running this test will *skip* the invocation of ``data_set`` with value ``2``:: + + $ pytest test_fixture_marks.py -v + =========================== test session starts ============================ + platform linux -- Python 3.x.y, pytest-3.x.y, py-1.x.y, pluggy-0.x.y -- $PYTHON_PREFIX/bin/python3.5 + cachedir: .pytest_cache + rootdir: $REGENDOC_TMPDIR, inifile: + collecting ... collected 3 items + + test_fixture_marks.py::test_data[0] PASSED [ 33%] + test_fixture_marks.py::test_data[1] PASSED [ 66%] + test_fixture_marks.py::test_data[2] SKIPPED [100%] + + =================== 2 passed, 1 skipped in 0.12 seconds ==================== + .. _`interdependent fixtures`: Modularity: using fixtures from a fixture function diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/doc/en/getting-started.rst new/pytest-3.5.1/doc/en/getting-started.rst --- old/pytest-3.5.0/doc/en/getting-started.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/doc/en/getting-started.rst 2018-04-24 23:37:15.000000000 +0200 @@ -166,6 +166,8 @@ pytest --fixtures # shows builtin and custom fixtures +Note that this command omits fixtures with leading ``_`` unless the ``-v`` option is added. + Continue reading ------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/doc/en/reference.rst new/pytest-3.5.1/doc/en/reference.rst --- old/pytest-3.5.0/doc/en/reference.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/doc/en/reference.rst 2018-04-24 23:37:15.000000000 +0200 @@ -94,6 +94,31 @@ fixtures or plugins. +.. _`pytest.mark.filterwarnings ref`: + +pytest.mark.filterwarnings +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**Tutorial**: :ref:`filterwarnings`. + +Add warning filters to marked test items. + +.. py:function:: pytest.mark.filterwarnings(filter) + + :keyword str filter: + A *warning specification string*, which is composed of contents of the tuple ``(action, message, category, module, lineno)`` + as specified in `The Warnings filter <https://docs.python.org/3/library/warnings.html#warning-filter>`_ section of + the Python documentation, separated by ``":"``. Optional fields can be omitted. + + For example: + + .. code-block:: python + + @pytest.mark.warnings("ignore:.*usage will be deprecated.*:DeprecationWarning") + def test_foo(): + ... + + .. _`pytest.mark.parametrize ref`: pytest.mark.parametrize @@ -502,6 +527,8 @@ .. autofunction:: pytest_addhooks .. autofunction:: pytest_configure .. autofunction:: pytest_unconfigure +.. autofunction:: pytest_sessionstart +.. autofunction:: pytest_sessionfinish Test running hooks ~~~~~~~~~~~~~~~~~~ @@ -991,7 +1018,7 @@ .. code-block:: ini [pytest] - log_cli_level = INFO + log_cli_level = INFO For more information, see :ref:`live_logs`. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/doc/en/test/plugin/terminal.rst new/pytest-3.5.1/doc/en/test/plugin/terminal.rst --- old/pytest-3.5.0/doc/en/test/plugin/terminal.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/doc/en/test/plugin/terminal.rst 2018-04-24 23:37:15.000000000 +0200 @@ -23,7 +23,7 @@ ``--full-trace`` don't cut any tracebacks (default is to cut). ``--fixtures`` - show available function arguments, sorted by plugin + show available fixtures, sorted by plugin appearance (fixtures with leading ``_`` are only shown with '-v') Start improving this plugin in 30 seconds ========================================= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/doc/en/warnings.rst new/pytest-3.5.1/doc/en/warnings.rst --- old/pytest-3.5.0/doc/en/warnings.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/doc/en/warnings.rst 2018-04-24 23:37:15.000000000 +0200 @@ -78,6 +78,9 @@ `-W option`_ and `warnings.simplefilter`_, so please refer to those sections in the Python documentation for other examples and advanced usage. + +.. _`filterwarnings`: + ``@pytest.mark.filterwarnings`` ------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/doc/en/writing_plugins.rst new/pytest-3.5.1/doc/en/writing_plugins.rst --- old/pytest-3.5.0/doc/en/writing_plugins.rst 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/doc/en/writing_plugins.rst 2018-04-24 23:37:15.000000000 +0200 @@ -85,8 +85,8 @@ Here is how you might run it:: - pytest test_flat.py # will not show "setting up" - pytest a/test_sub.py # will show "setting up" + pytest test_flat.py --capture=no # will not show "setting up" + pytest a/test_sub.py --capture=no # will show "setting up" .. note:: If you have ``conftest.py`` files which do not reside in a diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/pytest.egg-info/PKG-INFO new/pytest-3.5.1/pytest.egg-info/PKG-INFO --- old/pytest-3.5.0/pytest.egg-info/PKG-INFO 2018-03-23 00:47:53.000000000 +0100 +++ new/pytest-3.5.1/pytest.egg-info/PKG-INFO 2018-04-24 23:37:41.000000000 +0200 @@ -1,10 +1,12 @@ Metadata-Version: 1.2 Name: pytest -Version: 3.5.0 +Version: 3.5.1 Summary: pytest: simple powerful testing with Python Home-page: http://pytest.org Author: Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin and others License: MIT license +Project-URL: Source, https://github.com/pytest-dev/pytest +Project-URL: Tracker, https://github.com/pytest-dev/pytest/issues Description: .. image:: http://docs.pytest.org/en/latest/_static/pytest1.png :target: http://docs.pytest.org :align: center diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/pytest.egg-info/SOURCES.txt new/pytest-3.5.1/pytest.egg-info/SOURCES.txt --- old/pytest-3.5.0/pytest.egg-info/SOURCES.txt 2018-03-23 00:47:53.000000000 +0100 +++ new/pytest-3.5.1/pytest.egg-info/SOURCES.txt 2018-04-24 23:37:41.000000000 +0200 @@ -68,40 +68,15 @@ bench/empty.py bench/manyparam.py bench/skip.py -changelog/1478.feature -changelog/1642.feature.rst -changelog/1713.doc.rst -changelog/2370.bugfix.rst -changelog/2405.feature.rst -changelog/2770.feature -changelog/2770.removal.rst -changelog/3034.feature -changelog/3084.removal -changelog/3139.feature -changelog/3149.feature -changelog/3156.feature -changelog/3189.feature -changelog/3190.feature -changelog/3198.feature.rst -changelog/3204.feature -changelog/3213.feature -changelog/3228.trivial.rst -changelog/3236.feature.rst -changelog/3245.trivial.rst -changelog/3246.trival.rst -changelog/3250.trivial.rst -changelog/3255.feature.rst -changelog/3265.trivial.rst -changelog/3268.trivial -changelog/3291.trivial.rst -changelog/3292.trivial.rst -changelog/3296.feature -changelog/3296.trivial -changelog/3297.bugfix.rst -changelog/3304.trivial -changelog/3308.trivial.rst -changelog/3312.feature -changelog/3314.bugfix.rst +changelog/2798.bugfix.rst +changelog/3221.feature +changelog/3330.trivial.rst +changelog/3339.trivial +changelog/3348.bugfix.rst +changelog/3360.trivial +changelog/3372.bugfix.rst +changelog/3398.trivial.rst +changelog/3406.doc.rst changelog/README.rst changelog/_template.rst doc/en/Makefile @@ -234,6 +209,7 @@ doc/en/announce/release-3.4.1.rst doc/en/announce/release-3.4.2.rst doc/en/announce/release-3.5.0.rst +doc/en/announce/release-3.5.1.rst doc/en/announce/sprint2016.rst doc/en/example/attic.rst doc/en/example/conftest.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/pytest.egg-info/requires.txt new/pytest-3.5.1/pytest.egg-info/requires.txt --- old/pytest-3.5.0/pytest.egg-info/requires.txt 2018-03-23 00:47:53.000000000 +0100 +++ new/pytest-3.5.1/pytest.egg-info/requires.txt 2018-04-24 23:37:41.000000000 +0200 @@ -2,7 +2,7 @@ six>=1.10.0 setuptools attrs>=17.4.0 -more_itertools>=4.0.0 +more-itertools>=4.0.0 pluggy<0.7,>=0.5 [:python_version < "3.0"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/setup.py new/pytest-3.5.1/setup.py --- old/pytest-3.5.0/setup.py 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/setup.py 2018-04-24 23:37:15.000000000 +0200 @@ -60,7 +60,7 @@ 'six>=1.10.0', 'setuptools', 'attrs>=17.4.0', - 'more_itertools>=4.0.0', + 'more-itertools>=4.0.0', ] # if _PYTEST_SETUP_SKIP_PLUGGY_DEP is set, skip installing pluggy; # used by tox.ini to test with pluggy master @@ -87,6 +87,10 @@ 'write_to': '_pytest/_version.py', }, url='http://pytest.org', + project_urls={ + 'Source': 'https://github.com/pytest-dev/pytest', + 'Tracker': 'https://github.com/pytest-dev/pytest/issues', + }, license='MIT license', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], author=( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/testing/acceptance_test.py new/pytest-3.5.1/testing/acceptance_test.py --- old/pytest-3.5.0/testing/acceptance_test.py 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/testing/acceptance_test.py 2018-04-24 23:37:15.000000000 +0200 @@ -988,3 +988,33 @@ ''') result = testdir.runpytest() assert result.ret == 0 + + +def test_frame_leak_on_failing_test(testdir): + """pytest would leak garbage referencing the frames of tests that failed that could never be reclaimed (#2798) + + Unfortunately it was not possible to remove the actual circles because most of them + are made of traceback objects which cannot be weakly referenced. Those objects at least + can be eventually claimed by the garbage collector. + """ + testdir.makepyfile(''' + import gc + import weakref + + class Obj: + pass + + ref = None + + def test1(): + obj = Obj() + global ref + ref = weakref.ref(obj) + assert 0 + + def test2(): + gc.collect() + assert ref() is None + ''') + result = testdir.runpytest_subprocess() + result.stdout.fnmatch_lines(['*1 failed, 1 passed in*']) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/testing/python/metafunc.py new/pytest-3.5.1/testing/python/metafunc.py --- old/pytest-3.5.0/testing/python/metafunc.py 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/testing/python/metafunc.py 2018-04-24 23:37:15.000000000 +0200 @@ -616,6 +616,19 @@ "*uses no argument 'y'*", ]) + def test_parametrize_gives_indicative_error_on_function_with_default_argument(self, testdir): + testdir.makepyfile(""" + import pytest + + @pytest.mark.parametrize('x, y', [('a', 'b')]) + def test_simple(x, y=1): + assert len(x) == 1 + """) + result = testdir.runpytest("--collect-only") + result.stdout.fnmatch_lines([ + "*already takes an argument 'y' with a default value", + ]) + def test_addcalls_and_parametrize_indirect(self): def func(x, y): pass diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/testing/python/raises.py new/pytest-3.5.1/testing/python/raises.py --- old/pytest-3.5.0/testing/python/raises.py 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/testing/python/raises.py 2018-04-24 23:37:15.000000000 +0200 @@ -1,3 +1,4 @@ +from _pytest.outcomes import Failed import pytest import sys @@ -61,6 +62,11 @@ with pytest.raises(TypeError): pytest.raises('wrong', lambda: None) + def test_invalid_arguments_to_raises(self): + with pytest.raises(TypeError, match='unknown'): + with pytest.raises(TypeError, unknown='bogus'): + raise ValueError() + def test_tuple(self): with pytest.raises((KeyError, ValueError)): raise KeyError('oops') @@ -142,3 +148,20 @@ with pytest.raises(ValueError): with pytest.raises(IndexError, match='nomatch'): int('asdf') + + def test_raises_exception_looks_iterable(self): + from six import add_metaclass + + class Meta(type(object)): + def __getitem__(self, item): + return 1/0 + + def __len__(self): + return 1 + + @add_metaclass(Meta) + class ClassLooksIterableException(Exception): + pass + + with pytest.raises(Failed, match="DID NOT RAISE <class 'raises.ClassLooksIterableException'>"): + pytest.raises(ClassLooksIterableException, lambda: None) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/testing/test_junitxml.py new/pytest-3.5.1/testing/test_junitxml.py --- old/pytest-3.5.0/testing/test_junitxml.py 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/testing/test_junitxml.py 2018-04-24 23:37:15.000000000 +0200 @@ -868,17 +868,13 @@ def test_record(record_property, other): record_property("foo", "<1"); """) - result, dom = runandparse(testdir, '-rw') + result, dom = runandparse(testdir, '-rwv') node = dom.find_first_by_tag("testsuite") tnode = node.find_first_by_tag("testcase") psnode = tnode.find_first_by_tag('properties') pnodes = psnode.find_by_tag('property') pnodes[0].assert_attr(name="bar", value="1") pnodes[1].assert_attr(name="foo", value="<1") - result.stdout.fnmatch_lines([ - 'test_record_property.py::test_record', - '*record_property*experimental*', - ]) def test_record_property_same_name(testdir): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/testing/test_recwarn.py new/pytest-3.5.1/testing/test_recwarn.py --- old/pytest-3.5.0/testing/test_recwarn.py 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/testing/test_recwarn.py 2018-04-24 23:37:15.000000000 +0200 @@ -113,7 +113,7 @@ pass msg = 'Did not produce DeprecationWarning or PendingDeprecationWarning' - with pytest.raises(AssertionError, matches=msg): + with pytest.raises(AssertionError, match=msg): if mode == 'call': pytest.deprecated_call(f) else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/testing/test_runner.py new/pytest-3.5.1/testing/test_runner.py --- old/pytest-3.5.0/testing/test_runner.py 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/testing/test_runner.py 2018-04-24 23:37:15.000000000 +0200 @@ -719,18 +719,20 @@ result.stdout.fnmatch_lines(["*test_fix*", "*fixture*'missing'*not found*"]) -def test_store_except_info_on_eror(): +def test_store_except_info_on_error(): """ Test that upon test failure, the exception info is stored on sys.last_traceback and friends. """ - # Simulate item that raises a specific exception - class ItemThatRaises(object): + # Simulate item that might raise a specific exception, depending on `raise_error` class var + class ItemMightRaise(object): nodeid = 'item_that_raises' + raise_error = True def runtest(self): - raise IndexError('TEST') + if self.raise_error: + raise IndexError('TEST') try: - runner.pytest_runtest_call(ItemThatRaises()) + runner.pytest_runtest_call(ItemMightRaise()) except IndexError: pass # Check that exception info is stored on sys @@ -738,6 +740,13 @@ assert sys.last_value.args[0] == 'TEST' assert sys.last_traceback + # The next run should clear the exception info stored by the previous run + ItemMightRaise.raise_error = False + runner.pytest_runtest_call(ItemMightRaise()) + assert sys.last_type is None + assert sys.last_value is None + assert sys.last_traceback is None + def test_current_test_env_var(testdir, monkeypatch): pytest_current_test_vars = [] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-3.5.0/tox.ini new/pytest-3.5.1/tox.ini --- old/pytest-3.5.0/tox.ini 2018-03-23 00:47:21.000000000 +0100 +++ new/pytest-3.5.1/tox.ini 2018-04-24 23:37:15.000000000 +0200 @@ -13,7 +13,7 @@ {py27,py36}-{pexpect,xdist,trial,numpy,pluggymaster} py27-nobyte doctesting - py35-freeze + py36-freeze docs [testenv] @@ -56,12 +56,11 @@ hypothesis>=3.5.2 changedir=testing commands = - pytest -n1 -ra {posargs:.} + pytest -n8 -ra {posargs:.} [testenv:py36-xdist] deps = {[testenv:py27-xdist]deps} -commands = - pytest -n3 -ra {posargs:testing} +commands = {[testenv:py27-xdist]commands} [testenv:py27-pexpect] changedir = testing @@ -71,11 +70,10 @@ pytest -ra test_pdb.py test_terminal.py test_unittest.py [testenv:py36-pexpect] -changedir = testing -platform = linux|darwin +changedir = {[testenv:py27-pexpect]changedir} +platform = {[testenv:py27-pexpect]platform} deps = {[testenv:py27-pexpect]deps} -commands = - pytest -ra test_pdb.py test_terminal.py test_unittest.py +commands = {[testenv:py27-pexpect]commands} [testenv:py27-nobyte] deps = @@ -95,18 +93,16 @@ [testenv:py36-trial] deps = {[testenv:py27-trial]deps} -commands = - pytest -ra {posargs:testing/test_unittest.py} +commands = {[testenv:py27-trial]commands} [testenv:py27-numpy] -deps=numpy +deps = numpy commands= pytest -ra {posargs:testing/python/approx.py} [testenv:py36-numpy] -deps=numpy -commands= - pytest -ra {posargs:testing/python/approx.py} +deps = {[testenv:py27-numpy]deps} +commands = {[testenv:py27-numpy]commands} [testenv:py27-pluggymaster] setenv= @@ -115,12 +111,9 @@ {[testenv]deps} git+https://github.com/pytest-dev/pluggy.git@master -[testenv:py35-pluggymaster] -setenv= - _PYTEST_SETUP_SKIP_PLUGGY_DEP=1 -deps = - {[testenv:py27-pluggymaster]deps} - git+https://github.com/pytest-dev/pluggy.git@master +[testenv:py36-pluggymaster] +setenv = {[testenv:py27-pluggymaster]setenv} +deps = {[testenv:py27-pluggymaster]deps} [testenv:docs] skipsdist = True @@ -128,7 +121,7 @@ changedir = doc/en deps = attrs - more_itertools + more-itertools PyYAML sphinx sphinxcontrib-trio @@ -176,7 +169,7 @@ commands = {envpython} {envbindir}/py.test-jython -ra {posargs} -[testenv:py35-freeze] +[testenv:py36-freeze] changedir = testing/freeze deps = pyinstaller commands = @@ -199,7 +192,6 @@ [pytest] minversion = 2.0 plugins = pytester -#--pyargs --doctest-modules --ignore=.tox addopts = -ra -p pytester --ignore=testing/cx_freeze rsyncdirs = tox.ini pytest.py _pytest testing python_files = test_*.py *_test.py testing/*/*.py