From 26166f7a91dc5b516c810e166dc106bbd3b2bad7 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 9 Mar 2020 16:29:15 +0100 Subject: [PATCH] changelog: use anonymous hyperlinks Ref: https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#anonymous-hyperlinks Ref: https://github.com/sphinx-doc/sphinx/issues/3921 Ref: https://github.com/hawkowl/towncrier/issues/177 --- changelog/4351.improvement.rst | 1 + changelog/_template.rst | 2 +- doc/en/archive/changelog.rst | 1222 ++++++++++++++++---------------- doc/en/changelog.rst | 356 +++++----- 4 files changed, 790 insertions(+), 791 deletions(-) create mode 100644 changelog/4351.improvement.rst diff --git a/changelog/4351.improvement.rst b/changelog/4351.improvement.rst new file mode 100644 index 00000000000..b061e320917 --- /dev/null +++ b/changelog/4351.improvement.rst @@ -0,0 +1 @@ +pytest's own tests now work with plugins like pytest-repeat being installed (they are not used for inner tests anymore). diff --git a/changelog/_template.rst b/changelog/_template.rst index 5de4ae97ea8..404a0a2273e 100644 --- a/changelog/_template.rst +++ b/changelog/_template.rst @@ -14,7 +14,7 @@ {% if definitions[category]['showcontent'] %} {% for text, values in sections[section][category]|dictsort(by='value') %} {% set issue_joiner = joiner(', ') %} -- {% for value in values|sort %}{{ issue_joiner() }}`{{ value }} `_{% endfor %}: {{ text }} +- {% for value in values|sort %}{{ issue_joiner() }}`{{ value }} `__{% endfor %}: {{ text }} {% endfor %} diff --git a/doc/en/archive/changelog.rst b/doc/en/archive/changelog.rst index 317d6a75f08..e899182f1f1 100644 --- a/doc/en/archive/changelog.rst +++ b/doc/en/archive/changelog.rst @@ -13,46 +13,46 @@ pytest 4.5.0 (2019-05-11) Features -------- -- `#4826 `_: A warning is now emitted when unknown marks are used as a decorator. +- `#4826 `__: A warning is now emitted when unknown marks are used as a decorator. This is often due to a typo, which can lead to silently broken tests. -- `#4907 `_: Show XFail reason as part of JUnitXML message field. +- `#4907 `__: Show XFail reason as part of JUnitXML message field. -- `#5013 `_: Messages from crash reports are displayed within test summaries now, truncated to the terminal width. +- `#5013 `__: Messages from crash reports are displayed within test summaries now, truncated to the terminal width. -- `#5023 `_: New flag ``--strict-markers`` that triggers an error when unknown markers (e.g. those not registered using the `markers option`_ in the configuration file) are used in the test suite. +- `#5023 `__: New flag ``--strict-markers`` that triggers an error when unknown markers (e.g. those not registered using the `markers option`_ in the configuration file) are used in the test suite. The existing ``--strict`` option has the same behavior currently, but can be augmented in the future for additional checks. .. _`markers option`: https://docs.pytest.org/en/latest/reference.html#confval-markers -- `#5026 `_: Assertion failure messages for sequences and dicts contain the number of different items now. +- `#5026 `__: Assertion failure messages for sequences and dicts contain the number of different items now. -- `#5034 `_: Improve reporting with ``--lf`` and ``--ff`` (run-last-failure). +- `#5034 `__: Improve reporting with ``--lf`` and ``--ff`` (run-last-failure). -- `#5035 `_: The ``--cache-show`` option/action accepts an optional glob to show only matching cache entries. +- `#5035 `__: The ``--cache-show`` option/action accepts an optional glob to show only matching cache entries. -- `#5059 `_: Standard input (stdin) can be given to pytester's ``Testdir.run()`` and ``Testdir.popen()``. +- `#5059 `__: Standard input (stdin) can be given to pytester's ``Testdir.run()`` and ``Testdir.popen()``. -- `#5068 `_: The ``-r`` option learnt about ``A`` to display all reports (including passed ones) in the short test summary. +- `#5068 `__: The ``-r`` option learnt about ``A`` to display all reports (including passed ones) in the short test summary. -- `#5108 `_: The short test summary is displayed after passes with output (``-rP``). +- `#5108 `__: The short test summary is displayed after passes with output (``-rP``). -- `#5172 `_: The ``--last-failed`` (``--lf``) option got smarter and will now skip entire files if all tests +- `#5172 `__: The ``--last-failed`` (``--lf``) option got smarter and will now skip entire files if all tests of that test file have passed in previous runs, greatly speeding up collection. -- `#5177 `_: Introduce new specific warning ``PytestWarning`` subclasses to make it easier to filter warnings based on the class, rather than on the message. The new subclasses are: +- `#5177 `__: Introduce new specific warning ``PytestWarning`` subclasses to make it easier to filter warnings based on the class, rather than on the message. The new subclasses are: * ``PytestAssertRewriteWarning`` @@ -68,14 +68,14 @@ Features * ``PytestUnknownMarkWarning`` -- `#5202 `_: New ``record_testsuite_property`` session-scoped fixture allows users to log ```` tags at the ``testsuite`` +- `#5202 `__: New ``record_testsuite_property`` session-scoped fixture allows users to log ```` tags at the ``testsuite`` level with the ``junitxml`` plugin. The generated XML is compatible with the latest xunit standard, contrary to the properties recorded by ``record_property`` and ``record_xml_attribute``. -- `#5214 `_: The default logging format has been changed to improve readability. Here is an +- `#5214 `__: The default logging format has been changed to improve readability. Here is an example of a previous logging message:: test_log_cli_enabled_disabled.py 3 CRITICAL critical message logged by test @@ -87,55 +87,55 @@ Features The formatting can be changed through the `log_format `__ configuration option. -- `#5220 `_: ``--fixtures`` now also shows fixture scope for scopes other than ``"function"``. +- `#5220 `__: ``--fixtures`` now also shows fixture scope for scopes other than ``"function"``. Bug Fixes --------- -- `#5113 `_: Deselected items from plugins using ``pytest_collect_modifyitems`` as a hookwrapper are correctly reported now. +- `#5113 `__: Deselected items from plugins using ``pytest_collect_modifyitems`` as a hookwrapper are correctly reported now. -- `#5144 `_: With usage errors ``exitstatus`` is set to ``EXIT_USAGEERROR`` in the ``pytest_sessionfinish`` hook now as expected. +- `#5144 `__: With usage errors ``exitstatus`` is set to ``EXIT_USAGEERROR`` in the ``pytest_sessionfinish`` hook now as expected. -- `#5235 `_: ``outcome.exit`` is not used with ``EOF`` in the pdb wrapper anymore, but only with ``quit``. +- `#5235 `__: ``outcome.exit`` is not used with ``EOF`` in the pdb wrapper anymore, but only with ``quit``. Improved Documentation ---------------------- -- `#4935 `_: Expand docs on registering marks and the effect of ``--strict``. +- `#4935 `__: Expand docs on registering marks and the effect of ``--strict``. Trivial/Internal Changes ------------------------ -- `#4942 `_: ``logging.raiseExceptions`` is not set to ``False`` anymore. +- `#4942 `__: ``logging.raiseExceptions`` is not set to ``False`` anymore. -- `#5013 `_: pytest now depends on `wcwidth `__ to properly track unicode character sizes for more precise terminal output. +- `#5013 `__: pytest now depends on `wcwidth `__ to properly track unicode character sizes for more precise terminal output. -- `#5059 `_: pytester's ``Testdir.popen()`` uses ``stdout`` and ``stderr`` via keyword arguments with defaults now (``subprocess.PIPE``). +- `#5059 `__: pytester's ``Testdir.popen()`` uses ``stdout`` and ``stderr`` via keyword arguments with defaults now (``subprocess.PIPE``). -- `#5069 `_: The code for the short test summary in the terminal was moved to the terminal plugin. +- `#5069 `__: The code for the short test summary in the terminal was moved to the terminal plugin. -- `#5082 `_: Improved validation of kwargs for various methods in the pytester plugin. +- `#5082 `__: Improved validation of kwargs for various methods in the pytester plugin. -- `#5202 `_: ``record_property`` now emits a ``PytestWarning`` when used with ``junit_family=xunit2``: the fixture generates +- `#5202 `__: ``record_property`` now emits a ``PytestWarning`` when used with ``junit_family=xunit2``: the fixture generates ``property`` tags as children of ``testcase``, which is not permitted according to the most `recent schema `__. -- `#5239 `_: Pin ``pluggy`` to ``< 1.0`` so we don't update to ``1.0`` automatically when +- `#5239 `__: Pin ``pluggy`` to ``< 1.0`` so we don't update to ``1.0`` automatically when it gets released: there are planned breaking changes, and we want to ensure pytest properly supports ``pluggy 1.0``. @@ -146,13 +146,13 @@ pytest 4.4.2 (2019-05-08) Bug Fixes --------- -- `#5089 `_: Fix crash caused by error in ``__repr__`` function with both ``showlocals`` and verbose output enabled. +- `#5089 `__: Fix crash caused by error in ``__repr__`` function with both ``showlocals`` and verbose output enabled. -- `#5139 `_: Eliminate core dependency on 'terminal' plugin. +- `#5139 `__: Eliminate core dependency on 'terminal' plugin. -- `#5229 `_: Require ``pluggy>=0.11.0`` which reverts a dependency to ``importlib-metadata`` added in ``0.10.0``. +- `#5229 `__: Require ``pluggy>=0.11.0`` which reverts a dependency to ``importlib-metadata`` added in ``0.10.0``. The ``importlib-metadata`` package cannot be imported when installed as an egg and causes issues when relying on ``setup.py`` to install test dependencies. @@ -160,17 +160,17 @@ Bug Fixes Improved Documentation ---------------------- -- `#5171 `_: Doc: ``pytest_ignore_collect``, ``pytest_collect_directory``, ``pytest_collect_file`` and ``pytest_pycollect_makemodule`` hooks's 'path' parameter documented type is now ``py.path.local`` +- `#5171 `__: Doc: ``pytest_ignore_collect``, ``pytest_collect_directory``, ``pytest_collect_file`` and ``pytest_pycollect_makemodule`` hooks's 'path' parameter documented type is now ``py.path.local`` -- `#5188 `_: Improve help for ``--runxfail`` flag. +- `#5188 `__: Improve help for ``--runxfail`` flag. Trivial/Internal Changes ------------------------ -- `#5182 `_: Removed internal and unused ``_pytest.deprecated.MARK_INFO_ATTRIBUTE``. +- `#5182 `__: Removed internal and unused ``_pytest.deprecated.MARK_INFO_ATTRIBUTE``. pytest 4.4.1 (2019-04-15) @@ -179,16 +179,16 @@ pytest 4.4.1 (2019-04-15) Bug Fixes --------- -- `#5031 `_: Environment variables are properly restored when using pytester's ``testdir`` fixture. +- `#5031 `__: Environment variables are properly restored when using pytester's ``testdir`` fixture. -- `#5039 `_: Fix regression with ``--pdbcls``, which stopped working with local modules in 4.0.0. +- `#5039 `__: Fix regression with ``--pdbcls``, which stopped working with local modules in 4.0.0. -- `#5092 `_: Produce a warning when unknown keywords are passed to ``pytest.param(...)``. +- `#5092 `__: Produce a warning when unknown keywords are passed to ``pytest.param(...)``. -- `#5098 `_: Invalidate import caches with ``monkeypatch.syspath_prepend``, which is required with namespace packages being used. +- `#5098 `__: Invalidate import caches with ``monkeypatch.syspath_prepend``, which is required with namespace packages being used. pytest 4.4.0 (2019-03-29) @@ -197,16 +197,16 @@ pytest 4.4.0 (2019-03-29) Features -------- -- `#2224 `_: ``async`` test functions are skipped and a warning is emitted when a suitable +- `#2224 `__: ``async`` test functions are skipped and a warning is emitted when a suitable async plugin is not installed (such as ``pytest-asyncio`` or ``pytest-trio``). Previously ``async`` functions would not execute at all but still be marked as "passed". -- `#2482 `_: Include new ``disable_test_id_escaping_and_forfeit_all_rights_to_community_support`` option to disable ascii-escaping in parametrized values. This may cause a series of problems and as the name makes clear, use at your own risk. +- `#2482 `__: Include new ``disable_test_id_escaping_and_forfeit_all_rights_to_community_support`` option to disable ascii-escaping in parametrized values. This may cause a series of problems and as the name makes clear, use at your own risk. -- `#4718 `_: The ``-p`` option can now be used to early-load plugins also by entry-point name, instead of just +- `#4718 `__: The ``-p`` option can now be used to early-load plugins also by entry-point name, instead of just by module name. This makes it possible to early load external plugins like ``pytest-cov`` in the command-line:: @@ -214,23 +214,21 @@ Features pytest -p pytest_cov -- `#4855 `_: The ``--pdbcls`` option handles classes via module attributes now (e.g. +- `#4855 `__: The ``--pdbcls`` option handles classes via module attributes now (e.g. ``pdb:pdb.Pdb`` with `pdb++`_), and its validation was improved. - .. _pdb++: https://pypi.org/project/pdbpp/ - -- `#4875 `_: The `testpaths `__ configuration option is now displayed next +- `#4875 `__: The `testpaths `__ configuration option is now displayed next to the ``rootdir`` and ``inifile`` lines in the pytest header if the option is in effect, i.e., directories or file names were not explicitly passed in the command line. Also, ``inifile`` is only displayed if there's a configuration file, instead of an empty ``inifile:`` string. -- `#4911 `_: Doctests can be skipped now dynamically using ``pytest.skip()``. +- `#4911 `__: Doctests can be skipped now dynamically using ``pytest.skip()``. -- `#4920 `_: Internal refactorings have been made in order to make the implementation of the +- `#4920 `__: Internal refactorings have been made in order to make the implementation of the `pytest-subtests `__ plugin possible, which adds unittest sub-test support and a new ``subtests`` fixture as discussed in `#1367 `__. @@ -238,30 +236,30 @@ Features For details on the internal refactorings, please see the details on the related PR. -- `#4931 `_: pytester's ``LineMatcher`` asserts that the passed lines are a sequence. +- `#4931 `__: pytester's ``LineMatcher`` asserts that the passed lines are a sequence. -- `#4936 `_: Handle ``-p plug`` after ``-p no:plug``. +- `#4936 `__: Handle ``-p plug`` after ``-p no:plug``. This can be used to override a blocked plugin (e.g. in "addopts") from the command line etc. -- `#4951 `_: Output capturing is handled correctly when only capturing via fixtures (capsys, capfs) with ``pdb.set_trace()``. +- `#4951 `__: Output capturing is handled correctly when only capturing via fixtures (capsys, capfs) with ``pdb.set_trace()``. -- `#4956 `_: ``pytester`` sets ``$HOME`` and ``$USERPROFILE`` to the temporary directory during test runs. +- `#4956 `__: ``pytester`` sets ``$HOME`` and ``$USERPROFILE`` to the temporary directory during test runs. This ensures to not load configuration files from the real user's home directory. -- `#4980 `_: Namespace packages are handled better with ``monkeypatch.syspath_prepend`` and ``testdir.syspathinsert`` (via ``pkg_resources.fixup_namespace_packages``). +- `#4980 `__: Namespace packages are handled better with ``monkeypatch.syspath_prepend`` and ``testdir.syspathinsert`` (via ``pkg_resources.fixup_namespace_packages``). -- `#4993 `_: The stepwise plugin reports status information now. +- `#4993 `__: The stepwise plugin reports status information now. -- `#5008 `_: If a ``setup.cfg`` file contains ``[tool:pytest]`` and also the no longer supported ``[pytest]`` section, pytest will use ``[tool:pytest]`` ignoring ``[pytest]``. Previously it would unconditionally error out. +- `#5008 `__: If a ``setup.cfg`` file contains ``[tool:pytest]`` and also the no longer supported ``[pytest]`` section, pytest will use ``[tool:pytest]`` ignoring ``[pytest]``. Previously it would unconditionally error out. This makes it simpler for plugins to support old pytest versions. @@ -270,72 +268,70 @@ Features Bug Fixes --------- -- `#1895 `_: Fix bug where fixtures requested dynamically via ``request.getfixturevalue()`` might be teardown +- `#1895 `__: Fix bug where fixtures requested dynamically via ``request.getfixturevalue()`` might be teardown before the requesting fixture. -- `#4851 `_: pytester unsets ``PYTEST_ADDOPTS`` now to not use outer options with ``testdir.runpytest()``. +- `#4851 `__: pytester unsets ``PYTEST_ADDOPTS`` now to not use outer options with ``testdir.runpytest()``. -- `#4903 `_: Use the correct modified time for years after 2038 in rewritten ``.pyc`` files. +- `#4903 `__: Use the correct modified time for years after 2038 in rewritten ``.pyc`` files. -- `#4928 `_: Fix line offsets with ``ScopeMismatch`` errors. +- `#4928 `__: Fix line offsets with ``ScopeMismatch`` errors. -- `#4957 `_: ``-p no:plugin`` is handled correctly for default (internal) plugins now, e.g. with ``-p no:capture``. +- `#4957 `__: ``-p no:plugin`` is handled correctly for default (internal) plugins now, e.g. with ``-p no:capture``. Previously they were loaded (imported) always, making e.g. the ``capfd`` fixture available. -- `#4968 `_: The pdb ``quit`` command is handled properly when used after the ``debug`` command with `pdb++`_. - - .. _pdb++: https://pypi.org/project/pdbpp/ +- `#4968 `__: The pdb ``quit`` command is handled properly when used after the ``debug`` command with `pdb++`_. -- `#4975 `_: Fix the interpretation of ``-qq`` option where it was being considered as ``-v`` instead. +- `#4975 `__: Fix the interpretation of ``-qq`` option where it was being considered as ``-v`` instead. -- `#4978 `_: ``outcomes.Exit`` is not swallowed in ``assertrepr_compare`` anymore. +- `#4978 `__: ``outcomes.Exit`` is not swallowed in ``assertrepr_compare`` anymore. -- `#4988 `_: Close logging's file handler explicitly when the session finishes. +- `#4988 `__: Close logging's file handler explicitly when the session finishes. -- `#5003 `_: Fix line offset with mark collection error (off by one). +- `#5003 `__: Fix line offset with mark collection error (off by one). Improved Documentation ---------------------- -- `#4974 `_: Update docs for ``pytest_cmdline_parse`` hook to note availability liminations +- `#4974 `__: Update docs for ``pytest_cmdline_parse`` hook to note availability liminations Trivial/Internal Changes ------------------------ -- `#4718 `_: ``pluggy>=0.9`` is now required. +- `#4718 `__: ``pluggy>=0.9`` is now required. -- `#4815 `_: ``funcsigs>=1.0`` is now required for Python 2.7. +- `#4815 `__: ``funcsigs>=1.0`` is now required for Python 2.7. -- `#4829 `_: Some left-over internal code related to ``yield`` tests has been removed. +- `#4829 `__: Some left-over internal code related to ``yield`` tests has been removed. -- `#4890 `_: Remove internally unused ``anypython`` fixture from the pytester plugin. +- `#4890 `__: Remove internally unused ``anypython`` fixture from the pytester plugin. -- `#4912 `_: Remove deprecated Sphinx directive, ``add_description_unit()``, +- `#4912 `__: Remove deprecated Sphinx directive, ``add_description_unit()``, pin sphinx-removed-in to >= 0.2.0 to support Sphinx 2.0. -- `#4913 `_: Fix pytest tests invocation with custom ``PYTHONPATH``. +- `#4913 `__: Fix pytest tests invocation with custom ``PYTHONPATH``. -- `#4965 `_: New ``pytest_report_to_serializable`` and ``pytest_report_from_serializable`` **experimental** hooks. +- `#4965 `__: New ``pytest_report_to_serializable`` and ``pytest_report_from_serializable`` **experimental** hooks. These hooks will be used by ``pytest-xdist``, ``pytest-subtests``, and the replacement for resultlog to serialize and customize reports. @@ -346,7 +342,7 @@ Trivial/Internal Changes Feedback is welcome from plugin authors and users alike. -- `#4987 `_: ``Collector.repr_failure`` respects the ``--tb`` option, but only defaults to ``short`` now (with ``auto``). +- `#4987 `__: ``Collector.repr_failure`` respects the ``--tb`` option, but only defaults to ``short`` now (with ``auto``). pytest 4.3.1 (2019-03-11) @@ -355,20 +351,20 @@ pytest 4.3.1 (2019-03-11) Bug Fixes --------- -- `#4810 `_: Logging messages inside ``pytest_runtest_logreport()`` are now properly captured and displayed. +- `#4810 `__: Logging messages inside ``pytest_runtest_logreport()`` are now properly captured and displayed. -- `#4861 `_: Improve validation of contents written to captured output so it behaves the same as when capture is disabled. +- `#4861 `__: Improve validation of contents written to captured output so it behaves the same as when capture is disabled. -- `#4898 `_: Fix ``AttributeError: FixtureRequest has no 'confg' attribute`` bug in ``testdir.copy_example``. +- `#4898 `__: Fix ``AttributeError: FixtureRequest has no 'confg' attribute`` bug in ``testdir.copy_example``. Trivial/Internal Changes ------------------------ -- `#4768 `_: Avoid pkg_resources import at the top-level. +- `#4768 `__: Avoid pkg_resources import at the top-level. pytest 4.3.0 (2019-02-16) @@ -377,7 +373,7 @@ pytest 4.3.0 (2019-02-16) Deprecations ------------ -- `#4724 `_: ``pytest.warns()`` now emits a warning when it receives unknown keyword arguments. +- `#4724 `__: ``pytest.warns()`` now emits a warning when it receives unknown keyword arguments. This will be changed into an error in the future. @@ -386,31 +382,31 @@ Deprecations Features -------- -- `#2753 `_: Usage errors from argparse are mapped to pytest's ``UsageError``. +- `#2753 `__: Usage errors from argparse are mapped to pytest's ``UsageError``. -- `#3711 `_: Add the ``--ignore-glob`` parameter to exclude test-modules with Unix shell-style wildcards. +- `#3711 `__: Add the ``--ignore-glob`` parameter to exclude test-modules with Unix shell-style wildcards. Add the ``collect_ignore_glob`` for ``conftest.py`` to exclude test-modules with Unix shell-style wildcards. -- `#4698 `_: The warning about Python 2.7 and 3.4 not being supported in pytest 5.0 has been removed. +- `#4698 `__: The warning about Python 2.7 and 3.4 not being supported in pytest 5.0 has been removed. In the end it was considered to be more of a nuisance than actual utility and users of those Python versions shouldn't have problems as ``pip`` will not install pytest 5.0 on those interpreters. -- `#4707 `_: With the help of new ``set_log_path()`` method there is a way to set ``log_file`` paths from hooks. +- `#4707 `__: With the help of new ``set_log_path()`` method there is a way to set ``log_file`` paths from hooks. Bug Fixes --------- -- `#4651 `_: ``--help`` and ``--version`` are handled with ``UsageError``. +- `#4651 `__: ``--help`` and ``--version`` are handled with ``UsageError``. -- `#4782 `_: Fix ``AssertionError`` with collection of broken symlinks with packages. +- `#4782 `__: Fix ``AssertionError`` with collection of broken symlinks with packages. pytest 4.2.1 (2019-02-12) @@ -419,45 +415,45 @@ pytest 4.2.1 (2019-02-12) Bug Fixes --------- -- `#2895 `_: The ``pytest_report_collectionfinish`` hook now is also called with ``--collect-only``. +- `#2895 `__: The ``pytest_report_collectionfinish`` hook now is also called with ``--collect-only``. -- `#3899 `_: Do not raise ``UsageError`` when an imported package has a ``pytest_plugins.py`` child module. +- `#3899 `__: Do not raise ``UsageError`` when an imported package has a ``pytest_plugins.py`` child module. -- `#4347 `_: Fix output capturing when using pdb++ with recursive debugging. +- `#4347 `__: Fix output capturing when using pdb++ with recursive debugging. -- `#4592 `_: Fix handling of ``collect_ignore`` via parent ``conftest.py``. +- `#4592 `__: Fix handling of ``collect_ignore`` via parent ``conftest.py``. -- `#4700 `_: Fix regression where ``setUpClass`` would always be called in subclasses even if all tests +- `#4700 `__: Fix regression where ``setUpClass`` would always be called in subclasses even if all tests were skipped by a ``unittest.skip()`` decorator applied in the subclass. -- `#4739 `_: Fix ``parametrize(... ids=)`` when the function returns non-strings. +- `#4739 `__: Fix ``parametrize(... ids=)`` when the function returns non-strings. -- `#4745 `_: Fix/improve collection of args when passing in ``__init__.py`` and a test file. +- `#4745 `__: Fix/improve collection of args when passing in ``__init__.py`` and a test file. -- `#4770 `_: ``more_itertools`` is now constrained to <6.0.0 when required for Python 2.7 compatibility. +- `#4770 `__: ``more_itertools`` is now constrained to <6.0.0 when required for Python 2.7 compatibility. -- `#526 `_: Fix "ValueError: Plugin already registered" exceptions when running in build directories that symlink to actual source. +- `#526 `__: Fix "ValueError: Plugin already registered" exceptions when running in build directories that symlink to actual source. Improved Documentation ---------------------- -- `#3899 `_: Add note to ``plugins.rst`` that ``pytest_plugins`` should not be used as a name for a user module containing plugins. +- `#3899 `__: Add note to ``plugins.rst`` that ``pytest_plugins`` should not be used as a name for a user module containing plugins. -- `#4324 `_: Document how to use ``raises`` and ``does_not_raise`` to write parametrized tests with conditional raises. +- `#4324 `__: Document how to use ``raises`` and ``does_not_raise`` to write parametrized tests with conditional raises. -- `#4709 `_: Document how to customize test failure messages when using +- `#4709 `__: Document how to customize test failure messages when using ``pytest.warns``. @@ -465,7 +461,7 @@ Improved Documentation Trivial/Internal Changes ------------------------ -- `#4741 `_: Some verbosity related attributes of the TerminalReporter plugin are now +- `#4741 `__: Some verbosity related attributes of the TerminalReporter plugin are now read only properties. @@ -475,79 +471,79 @@ pytest 4.2.0 (2019-01-30) Features -------- -- `#3094 `_: `Classic xunit-style `__ functions and methods +- `#3094 `__: `Classic 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 (see `#517 `__ for an example). -- `#4627 `_: 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 +- `#4627 `__: 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. -- `#4660 `_: The number of *selected* tests now are also displayed when the ``-k`` or ``-m`` flags are used. +- `#4660 `__: The number of *selected* tests now are also displayed when the ``-k`` or ``-m`` flags are used. -- `#4688 `_: ``pytest_report_teststatus`` hook now can also receive a ``config`` parameter. +- `#4688 `__: ``pytest_report_teststatus`` hook now can also receive a ``config`` parameter. -- `#4691 `_: ``pytest_terminal_summary`` hook now can also receive a ``config`` parameter. +- `#4691 `__: ``pytest_terminal_summary`` hook now can also receive a ``config`` parameter. Bug Fixes --------- -- `#3547 `_: ``--junitxml`` can emit XML compatible with Jenkins xUnit. +- `#3547 `__: ``--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 -- `#4280 `_: Improve quitting from pdb, especially with ``--trace``. +- `#4280 `__: Improve quitting from pdb, especially with ``--trace``. Using ``q[quit]`` after ``pdb.set_trace()`` will quit pytest also. -- `#4402 `_: Warning summary now groups warnings by message instead of by test id. +- `#4402 `__: 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. -- `#4536 `_: ``monkeypatch.delattr`` handles class descriptors like ``staticmethod``/``classmethod``. +- `#4536 `__: ``monkeypatch.delattr`` handles class descriptors like ``staticmethod``/``classmethod``. -- `#4649 `_: Restore marks being considered keywords for keyword expressions. +- `#4649 `__: Restore marks being considered keywords for keyword expressions. -- `#4653 `_: ``tmp_path`` fixture and other related ones provides resolved path (a.k.a real path) +- `#4653 `__: ``tmp_path`` fixture and other related ones provides resolved path (a.k.a real path) -- `#4667 `_: ``pytest_terminal_summary`` uses result from ``pytest_report_teststatus`` hook, rather than hardcoded strings. +- `#4667 `__: ``pytest_terminal_summary`` uses result from ``pytest_report_teststatus`` hook, rather than hardcoded strings. -- `#4669 `_: Correctly handle ``unittest.SkipTest`` exception containing non-ascii characters on Python 2. +- `#4669 `__: Correctly handle ``unittest.SkipTest`` exception containing non-ascii characters on Python 2. -- `#4680 `_: Ensure the ``tmpdir`` and the ``tmp_path`` fixtures are the same folder. +- `#4680 `__: Ensure the ``tmpdir`` and the ``tmp_path`` fixtures are the same folder. -- `#4681 `_: Ensure ``tmp_path`` is always a real path. +- `#4681 `__: Ensure ``tmp_path`` is always a real path. Trivial/Internal Changes ------------------------ -- `#4643 `_: Use ``a.item()`` instead of the deprecated ``np.asscalar(a)`` in ``pytest.approx``. +- `#4643 `__: Use ``a.item()`` instead of the deprecated ``np.asscalar(a)`` in ``pytest.approx``. ``np.asscalar`` has been `deprecated `__ in ``numpy 1.16.``. -- `#4657 `_: Copy saferepr from pylib +- `#4657 `__: Copy saferepr from pylib -- `#4668 `_: The verbose word for expected failures in the teststatus report changes from ``xfail`` to ``XFAIL`` to be consistent with other test outcomes. +- `#4668 `__: The verbose word for expected failures in the teststatus report changes from ``xfail`` to ``XFAIL`` to be consistent with other test outcomes. pytest 4.1.1 (2019-01-12) @@ -556,30 +552,30 @@ pytest 4.1.1 (2019-01-12) Bug Fixes --------- -- `#2256 `_: Show full repr with ``assert a==b`` and ``-vv``. +- `#2256 `__: Show full repr with ``assert a==b`` and ``-vv``. -- `#3456 `_: Extend Doctest-modules to ignore mock objects. +- `#3456 `__: Extend Doctest-modules to ignore mock objects. -- `#4617 `_: Fixed ``pytest.warns`` bug when context manager is reused (e.g. multiple parametrization). +- `#4617 `__: Fixed ``pytest.warns`` bug when context manager is reused (e.g. multiple parametrization). -- `#4631 `_: Don't rewrite assertion when ``__getattr__`` is broken +- `#4631 `__: Don't rewrite assertion when ``__getattr__`` is broken Improved Documentation ---------------------- -- `#3375 `_: Document that using ``setup.cfg`` may crash other tools or cause hard to track down problems because it uses a different parser than ``pytest.ini`` or ``tox.ini`` files. +- `#3375 `__: Document that using ``setup.cfg`` may crash other tools or cause hard to track down problems because it uses a different parser than ``pytest.ini`` or ``tox.ini`` files. Trivial/Internal Changes ------------------------ -- `#4602 `_: Uninstall ``hypothesis`` in regen tox env. +- `#4602 `__: Uninstall ``hypothesis`` in regen tox env. pytest 4.1.0 (2019-01-05) @@ -588,96 +584,96 @@ pytest 4.1.0 (2019-01-05) Removals -------- -- `#2169 `_: ``pytest.mark.parametrize``: in previous versions, errors raised by id functions were suppressed and changed into warnings. Now the exceptions are propagated, along with a pytest message informing the node, parameter value and index where the exception occurred. +- `#2169 `__: ``pytest.mark.parametrize``: in previous versions, errors raised by id functions were suppressed and changed into warnings. Now the exceptions are propagated, along with a pytest message informing the node, parameter value and index where the exception occurred. -- `#3078 `_: Remove legacy internal warnings system: ``config.warn``, ``Node.warn``. The ``pytest_logwarning`` now issues a warning when implemented. +- `#3078 `__: Remove legacy internal warnings system: ``config.warn``, ``Node.warn``. The ``pytest_logwarning`` now issues a warning when implemented. See our `docs `__ on information on how to update your code. -- `#3079 `_: Removed support for yield tests - they are fundamentally broken because they don't support fixtures properly since collection and test execution were separated. +- `#3079 `__: Removed support for yield tests - they are fundamentally broken because they don't support fixtures properly since collection and test execution were separated. See our `docs `__ on information on how to update your code. -- `#3082 `_: Removed support for applying marks directly to values in ``@pytest.mark.parametrize``. Use ``pytest.param`` instead. +- `#3082 `__: Removed support for applying marks directly to values in ``@pytest.mark.parametrize``. Use ``pytest.param`` instead. See our `docs `__ on information on how to update your code. -- `#3083 `_: Removed ``Metafunc.addcall``. This was the predecessor mechanism to ``@pytest.mark.parametrize``. +- `#3083 `__: Removed ``Metafunc.addcall``. This was the predecessor mechanism to ``@pytest.mark.parametrize``. See our `docs `__ on information on how to update your code. -- `#3085 `_: Removed support for passing strings to ``pytest.main``. Now, always pass a list of strings instead. +- `#3085 `__: Removed support for passing strings to ``pytest.main``. Now, always pass a list of strings instead. See our `docs `__ on information on how to update your code. -- `#3086 `_: ``[pytest]`` section in **setup.cfg** files is no longer supported, use ``[tool:pytest]`` instead. ``setup.cfg`` files +- `#3086 `__: ``[pytest]`` section in **setup.cfg** files is no longer supported, use ``[tool:pytest]`` instead. ``setup.cfg`` files are meant for use with ``distutils``, and a section named ``pytest`` has notoriously been a source of conflicts and bugs. Note that for **pytest.ini** and **tox.ini** files the section remains ``[pytest]``. -- `#3616 `_: Removed the deprecated compat properties for ``node.Class/Function/Module`` - use ``pytest.Class/Function/Module`` now. +- `#3616 `__: Removed the deprecated compat properties for ``node.Class/Function/Module`` - use ``pytest.Class/Function/Module`` now. See our `docs `__ on information on how to update your code. -- `#4421 `_: Removed the implementation of the ``pytest_namespace`` hook. +- `#4421 `__: Removed the implementation of the ``pytest_namespace`` hook. See our `docs `__ on information on how to update your code. -- `#4489 `_: Removed ``request.cached_setup``. This was the predecessor mechanism to modern fixtures. +- `#4489 `__: Removed ``request.cached_setup``. This was the predecessor mechanism to modern fixtures. See our `docs `__ on information on how to update your code. -- `#4535 `_: Removed the deprecated ``PyCollector.makeitem`` method. This method was made public by mistake a long time ago. +- `#4535 `__: Removed the deprecated ``PyCollector.makeitem`` method. This method was made public by mistake a long time ago. -- `#4543 `_: Removed support to define fixtures using the ``pytest_funcarg__`` prefix. Use the ``@pytest.fixture`` decorator instead. +- `#4543 `__: Removed support to define fixtures using the ``pytest_funcarg__`` prefix. Use the ``@pytest.fixture`` decorator instead. See our `docs `__ on information on how to update your code. -- `#4545 `_: Calling fixtures directly is now always an error instead of a warning. +- `#4545 `__: Calling fixtures directly is now always an error instead of a warning. See our `docs `__ on information on how to update your code. -- `#4546 `_: Remove ``Node.get_marker(name)`` the return value was not usable for more than a existence check. +- `#4546 `__: Remove ``Node.get_marker(name)`` the return value was not usable for more than a existence check. Use ``Node.get_closest_marker(name)`` as a replacement. -- `#4547 `_: The deprecated ``record_xml_property`` fixture has been removed, use the more generic ``record_property`` instead. +- `#4547 `__: The deprecated ``record_xml_property`` fixture has been removed, use the more generic ``record_property`` instead. See our `docs `__ for more information. -- `#4548 `_: An error is now raised if the ``pytest_plugins`` variable is defined in a non-top-level ``conftest.py`` file (i.e., not residing in the ``rootdir``). +- `#4548 `__: An error is now raised if the ``pytest_plugins`` variable is defined in a non-top-level ``conftest.py`` file (i.e., not residing in the ``rootdir``). See our `docs `__ for more information. -- `#891 `_: Remove ``testfunction.markername`` attributes - use ``Node.iter_markers(name=None)`` to iterate them. +- `#891 `__: Remove ``testfunction.markername`` attributes - use ``Node.iter_markers(name=None)`` to iterate them. Deprecations ------------ -- `#3050 `_: Deprecated the ``pytest.config`` global. +- `#3050 `__: Deprecated the ``pytest.config`` global. See https://docs.pytest.org/en/latest/deprecations.html#pytest-config-global for rationale. -- `#3974 `_: Passing the ``message`` parameter of ``pytest.raises`` now issues a ``DeprecationWarning``. +- `#3974 `__: Passing the ``message`` parameter of ``pytest.raises`` now issues a ``DeprecationWarning``. It is a common mistake to think this parameter will match the exception message, while in fact it only serves to provide a custom message in case the ``pytest.raises`` check fails. To avoid this @@ -687,7 +683,7 @@ Deprecations If you have concerns about this, please comment on `issue #3974 `__. -- `#4435 `_: Deprecated ``raises(..., 'code(as_a_string)')`` and ``warns(..., 'code(as_a_string)')``. +- `#4435 `__: Deprecated ``raises(..., 'code(as_a_string)')`` and ``warns(..., 'code(as_a_string)')``. See https://docs.pytest.org/en/latest/deprecations.html#raises-warns-exec for rationale and examples. @@ -696,7 +692,7 @@ Deprecations Features -------- -- `#3191 `_: A warning is now issued when assertions are made for ``None``. +- `#3191 `__: A warning is now issued when assertions are made for ``None``. This is a common source of confusion among new users, which write: @@ -721,25 +717,25 @@ Features will not issue the warning. -- `#3632 `_: Richer equality comparison introspection on ``AssertionError`` for objects created using `attrs `__ or `dataclasses `_ (Python 3.7+, `backported to 3.6 `__). +- `#3632 `__: Richer equality comparison introspection on ``AssertionError`` for objects created using `attrs `__ or `dataclasses `__ (Python 3.7+, `backported to 3.6 `__). -- `#4278 `_: ``CACHEDIR.TAG`` files are now created inside cache directories. +- `#4278 `__: ``CACHEDIR.TAG`` files are now created inside cache directories. Those files are part of the `Cache Directory Tagging Standard `__, and can be used by backup or synchronization programs to identify pytest's cache directory as such. -- `#4292 `_: ``pytest.outcomes.Exit`` is derived from ``SystemExit`` instead of ``KeyboardInterrupt``. This allows us to better handle ``pdb`` exiting. +- `#4292 `__: ``pytest.outcomes.Exit`` is derived from ``SystemExit`` instead of ``KeyboardInterrupt``. This allows us to better handle ``pdb`` exiting. -- `#4371 `_: Updated the ``--collect-only`` option to display test descriptions when ran using ``--verbose``. +- `#4371 `__: Updated the ``--collect-only`` option to display test descriptions when ran using ``--verbose``. -- `#4386 `_: Restructured ``ExceptionInfo`` object construction and ensure incomplete instances have a ``repr``/``str``. +- `#4386 `__: Restructured ``ExceptionInfo`` object construction and ensure incomplete instances have a ``repr``/``str``. -- `#4416 `_: pdb: added support for keyword arguments with ``pdb.set_trace``. +- `#4416 `__: pdb: added support for keyword arguments with ``pdb.set_trace``. It handles ``header`` similar to Python 3.7 does it, and forwards any other keyword arguments to the ``Pdb`` constructor. @@ -747,7 +743,7 @@ Features This allows for ``__import__("pdb").set_trace(skip=["foo.*"])``. -- `#4483 `_: Added ini parameter ``junit_duration_report`` to optionally report test call durations, excluding setup and teardown times. +- `#4483 `__: Added ini parameter ``junit_duration_report`` to optionally report test call durations, excluding setup and teardown times. The JUnit XML specification and the default pytest behavior is to include setup and teardown times in the test duration report. You can include just the call durations instead (excluding setup and teardown) by adding this to your ``pytest.ini`` file: @@ -758,12 +754,12 @@ Features junit_duration_report = call -- `#4532 `_: ``-ra`` now will show errors and failures last, instead of as the first items in the summary. +- `#4532 `__: ``-ra`` now will show errors and failures last, instead of as the first items in the summary. This makes it easier to obtain a list of errors and failures to run tests selectively. -- `#4599 `_: ``pytest.importorskip`` now supports a ``reason`` parameter, which will be shown when the +- `#4599 `__: ``pytest.importorskip`` now supports a ``reason`` parameter, which will be shown when the requested module cannot be imported. @@ -771,39 +767,39 @@ Features Bug Fixes --------- -- `#3532 `_: ``-p`` now accepts its argument without a space between the value, for example ``-pmyplugin``. +- `#3532 `__: ``-p`` now accepts its argument without a space between the value, for example ``-pmyplugin``. -- `#4327 `_: ``approx`` again works with more generic containers, more precisely instances of ``Iterable`` and ``Sized`` instead of more restrictive ``Sequence``. +- `#4327 `__: ``approx`` again works with more generic containers, more precisely instances of ``Iterable`` and ``Sized`` instead of more restrictive ``Sequence``. -- `#4397 `_: Ensure that node ids are printable. +- `#4397 `__: Ensure that node ids are printable. -- `#4435 `_: Fixed ``raises(..., 'code(string)')`` frame filename. +- `#4435 `__: Fixed ``raises(..., 'code(string)')`` frame filename. -- `#4458 `_: Display actual test ids in ``--collect-only``. +- `#4458 `__: Display actual test ids in ``--collect-only``. Improved Documentation ---------------------- -- `#4557 `_: Markers example documentation page updated to support latest pytest version. +- `#4557 `__: Markers example documentation page updated to support latest pytest version. -- `#4558 `_: Update cache documentation example to correctly show cache hit and miss. +- `#4558 `__: Update cache documentation example to correctly show cache hit and miss. -- `#4580 `_: Improved detailed summary report documentation. +- `#4580 `__: Improved detailed summary report documentation. Trivial/Internal Changes ------------------------ -- `#4447 `_: Changed the deprecation type of ``--result-log`` to ``PytestDeprecationWarning``. +- `#4447 `__: Changed the deprecation type of ``--result-log`` to ``PytestDeprecationWarning``. It was decided to remove this feature at the next major revision. @@ -814,23 +810,23 @@ pytest 4.0.2 (2018-12-13) Bug Fixes --------- -- `#4265 `_: Validate arguments from the ``PYTEST_ADDOPTS`` environment variable and the ``addopts`` ini option separately. +- `#4265 `__: Validate arguments from the ``PYTEST_ADDOPTS`` environment variable and the ``addopts`` ini option separately. -- `#4435 `_: Fix ``raises(..., 'code(string)')`` frame filename. +- `#4435 `__: Fix ``raises(..., 'code(string)')`` frame filename. -- `#4500 `_: When a fixture yields and a log call is made after the test runs, and, if the test is interrupted, capture attributes are ``None``. +- `#4500 `__: When a fixture yields and a log call is made after the test runs, and, if the test is interrupted, capture attributes are ``None``. -- `#4538 `_: Raise ``TypeError`` for ``with raises(..., match=)``. +- `#4538 `__: Raise ``TypeError`` for ``with raises(..., match=)``. Improved Documentation ---------------------- -- `#1495 `_: Document common doctest fixture directory tree structure pitfalls +- `#1495 `__: Document common doctest fixture directory tree structure pitfalls pytest 4.0.1 (2018-11-23) @@ -839,35 +835,35 @@ pytest 4.0.1 (2018-11-23) Bug Fixes --------- -- `#3952 `_: Display warnings before "short test summary info" again, but still later warnings in the end. +- `#3952 `__: Display warnings before "short test summary info" again, but still later warnings in the end. -- `#4386 `_: Handle uninitialized exceptioninfo in repr/str. +- `#4386 `__: Handle uninitialized exceptioninfo in repr/str. -- `#4393 `_: Do not create ``.gitignore``/``README.md`` files in existing cache directories. +- `#4393 `__: Do not create ``.gitignore``/``README.md`` files in existing cache directories. -- `#4400 `_: Rearrange warning handling for the yield test errors so the opt-out in 4.0.x correctly works. +- `#4400 `__: Rearrange warning handling for the yield test errors so the opt-out in 4.0.x correctly works. -- `#4405 `_: Fix collection of testpaths with ``--pyargs``. +- `#4405 `__: Fix collection of testpaths with ``--pyargs``. -- `#4412 `_: Fix assertion rewriting involving ``Starred`` + side-effects. +- `#4412 `__: Fix assertion rewriting involving ``Starred`` + side-effects. -- `#4425 `_: Ensure we resolve the absolute path when the given ``--basetemp`` is a relative path. +- `#4425 `__: Ensure we resolve the absolute path when the given ``--basetemp`` is a relative path. Trivial/Internal Changes ------------------------ -- `#4315 `_: Use ``pkg_resources.parse_version`` instead of ``LooseVersion`` in minversion check. +- `#4315 `__: Use ``pkg_resources.parse_version`` instead of ``LooseVersion`` in minversion check. -- `#4440 `_: Adjust the stack level of some internal pytest warnings. +- `#4440 `__: Adjust the stack level of some internal pytest warnings. pytest 4.0.0 (2018-11-13) @@ -876,7 +872,7 @@ pytest 4.0.0 (2018-11-13) Removals -------- -- `#3737 `_: **RemovedInPytest4Warnings are now errors by default.** +- `#3737 `__: **RemovedInPytest4Warnings are now errors by default.** Following our plan to remove deprecated features with as little disruption as possible, all warnings of type ``RemovedInPytest4Warnings`` now generate errors @@ -901,7 +897,7 @@ Removals comment to `#4348 `__. -- `#4358 `_: Remove the ``::()`` notation to denote a test class instance in node ids. +- `#4358 `__: Remove the ``::()`` notation to denote a test class instance in node ids. Previously, node ids that contain test instances would use ``::()`` to denote the instance like this:: @@ -916,7 +912,7 @@ Removals The extra ``::()`` might have been removed in some places internally already, which then led to confusion in places where it was expected, e.g. with - ``--deselect`` (`#4127 `_). + ``--deselect`` (`#4127 `__). Test class instances are also not listed with ``--collect-only`` anymore. @@ -925,7 +921,7 @@ Removals Features -------- -- `#4270 `_: The ``cache_dir`` option uses ``$TOX_ENV_DIR`` as prefix (if set in the environment). +- `#4270 `__: The ``cache_dir`` option uses ``$TOX_ENV_DIR`` as prefix (if set in the environment). This uses a different cache per tox environment by default. @@ -934,7 +930,7 @@ Features Bug Fixes --------- -- `#3554 `_: Fix ``CallInfo.__repr__`` for when the call is not finished yet. +- `#3554 `__: Fix ``CallInfo.__repr__`` for when the call is not finished yet. pytest 3.10.1 (2018-11-11) @@ -943,32 +939,32 @@ pytest 3.10.1 (2018-11-11) Bug Fixes --------- -- `#4287 `_: Fix nested usage of debugging plugin (pdb), e.g. with pytester's ``testdir.runpytest``. +- `#4287 `__: Fix nested usage of debugging plugin (pdb), e.g. with pytester's ``testdir.runpytest``. -- `#4304 `_: Block the ``stepwise`` plugin if ``cacheprovider`` is also blocked, as one depends on the other. +- `#4304 `__: Block the ``stepwise`` plugin if ``cacheprovider`` is also blocked, as one depends on the other. -- `#4306 `_: Parse ``minversion`` as an actual version and not as dot-separated strings. +- `#4306 `__: Parse ``minversion`` as an actual version and not as dot-separated strings. -- `#4310 `_: Fix duplicate collection due to multiple args matching the same packages. +- `#4310 `__: Fix duplicate collection due to multiple args matching the same packages. -- `#4321 `_: Fix ``item.nodeid`` with resolved symlinks. +- `#4321 `__: Fix ``item.nodeid`` with resolved symlinks. -- `#4325 `_: Fix collection of direct symlinked files, where the target does not match ``python_files``. +- `#4325 `__: Fix collection of direct symlinked files, where the target does not match ``python_files``. -- `#4329 `_: Fix TypeError in report_collect with _collect_report_last_write. +- `#4329 `__: Fix TypeError in report_collect with _collect_report_last_write. Trivial/Internal Changes ------------------------ -- `#4305 `_: Replace byte/unicode helpers in test_capture with python level syntax. +- `#4305 `__: Replace byte/unicode helpers in test_capture with python level syntax. pytest 3.10.0 (2018-11-03) @@ -977,19 +973,19 @@ pytest 3.10.0 (2018-11-03) Features -------- -- `#2619 `_: Resume capturing output after ``continue`` with ``__import__("pdb").set_trace()``. +- `#2619 `__: 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. -- `#4147 `_: 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. +- `#4147 `__: 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. -- `#4188 `_: 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. +- `#4188 `__: 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. -- `#4225 `_: Improve performance with collection reporting in non-quiet mode with terminals. +- `#4225 `__: Improve performance with collection reporting in non-quiet mode with terminals. The "collecting …" message is only printed/updated every 0.5s. @@ -998,45 +994,45 @@ Features Bug Fixes --------- -- `#2701 `_: Fix false ``RemovedInPytest4Warning: usage of Session... is deprecated, please use pytest`` warnings. +- `#2701 `__: Fix false ``RemovedInPytest4Warning: usage of Session... is deprecated, please use pytest`` warnings. -- `#4046 `_: Fix problems with running tests in package ``__init__.py`` files. +- `#4046 `__: Fix problems with running tests in package ``__init__.py`` files. -- `#4260 `_: Swallow warnings during anonymous compilation of source. +- `#4260 `__: Swallow warnings during anonymous compilation of source. -- `#4262 `_: Fix access denied error when deleting stale directories created by ``tmpdir`` / ``tmp_path``. +- `#4262 `__: Fix access denied error when deleting stale directories created by ``tmpdir`` / ``tmp_path``. -- `#611 `_: Naming a fixture ``request`` will now raise a warning: the ``request`` fixture is internal and +- `#611 `__: 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. -- `#4266 `_: Handle (ignore) exceptions raised during collection, e.g. with Django's LazySettings proxy class. +- `#4266 `__: Handle (ignore) exceptions raised during collection, e.g. with Django's LazySettings proxy class. Improved Documentation ---------------------- -- `#4255 `_: Added missing documentation about the fact that module names passed to filter warnings are not regex-escaped. +- `#4255 `__: Added missing documentation about the fact that module names passed to filter warnings are not regex-escaped. Trivial/Internal Changes ------------------------ -- `#4272 `_: Display cachedir also in non-verbose mode if non-default. +- `#4272 `__: Display cachedir also in non-verbose mode if non-default. -- `#4277 `_: pdb: improve message about output capturing with ``set_trace``. +- `#4277 `__: pdb: improve message about output capturing with ``set_trace``. Do not display "IO-capturing turned off/on" when ``-s`` is used to avoid confusion. -- `#4279 `_: Improve message and stack level of warnings issued by ``monkeypatch.setenv`` when the value of the environment variable is not a ``str``. +- `#4279 `__: Improve message and stack level of warnings issued by ``monkeypatch.setenv`` when the value of the environment variable is not a ``str``. pytest 3.9.3 (2018-10-27) @@ -1045,36 +1041,36 @@ pytest 3.9.3 (2018-10-27) Bug Fixes --------- -- `#4174 `_: Fix "ValueError: Plugin already registered" with conftest plugins via symlink. +- `#4174 `__: Fix "ValueError: Plugin already registered" with conftest plugins via symlink. -- `#4181 `_: Handle race condition between creation and deletion of temporary folders. +- `#4181 `__: Handle race condition between creation and deletion of temporary folders. -- `#4221 `_: Fix bug where the warning summary at the end of the test session was not showing the test where the warning was originated. +- `#4221 `__: Fix bug where the warning summary at the end of the test session was not showing the test where the warning was originated. -- `#4243 `_: Fix regression when ``stacklevel`` for warnings was passed as positional argument on python2. +- `#4243 `__: Fix regression when ``stacklevel`` for warnings was passed as positional argument on python2. Improved Documentation ---------------------- -- `#3851 `_: Add reference to ``empty_parameter_set_mark`` ini option in documentation of ``@pytest.mark.parametrize`` +- `#3851 `__: Add reference to ``empty_parameter_set_mark`` ini option in documentation of ``@pytest.mark.parametrize`` Trivial/Internal Changes ------------------------ -- `#4028 `_: Revert patching of ``sys.breakpointhook`` since it appears to do nothing. +- `#4028 `__: Revert patching of ``sys.breakpointhook`` since it appears to do nothing. -- `#4233 `_: Apply an import sorter (``reorder-python-imports``) to the codebase. +- `#4233 `__: Apply an import sorter (``reorder-python-imports``) to the codebase. -- `#4248 `_: Remove use of unnecessary compat shim, six.binary_type +- `#4248 `__: Remove use of unnecessary compat shim, six.binary_type pytest 3.9.2 (2018-10-22) @@ -1083,29 +1079,29 @@ pytest 3.9.2 (2018-10-22) Bug Fixes --------- -- `#2909 `_: Improve error message when a recursive dependency between fixtures is detected. +- `#2909 `__: Improve error message when a recursive dependency between fixtures is detected. -- `#3340 `_: Fix logging messages not shown in hooks ``pytest_sessionstart()`` and ``pytest_sessionfinish()``. +- `#3340 `__: Fix logging messages not shown in hooks ``pytest_sessionstart()`` and ``pytest_sessionfinish()``. -- `#3533 `_: Fix unescaped XML raw objects in JUnit report for skipped tests +- `#3533 `__: Fix unescaped XML raw objects in JUnit report for skipped tests -- `#3691 `_: Python 2: safely format warning message about passing unicode strings to ``warnings.warn``, which may cause +- `#3691 `__: Python 2: safely format warning message about passing unicode strings to ``warnings.warn``, which may cause surprising ``MemoryError`` exception when monkey patching ``warnings.warn`` itself. -- `#4026 `_: Improve error message when it is not possible to determine a function's signature. +- `#4026 `__: Improve error message when it is not possible to determine a function's signature. -- `#4177 `_: Pin ``setuptools>=40.0`` to support ``py_modules`` in ``setup.cfg`` +- `#4177 `__: Pin ``setuptools>=40.0`` to support ``py_modules`` in ``setup.cfg`` -- `#4179 `_: Restore the tmpdir behaviour of symlinking the current test run. +- `#4179 `__: Restore the tmpdir behaviour of symlinking the current test run. -- `#4192 `_: Fix filename reported by ``warnings.warn`` when using ``recwarn`` under python2. +- `#4192 `__: Fix filename reported by ``warnings.warn`` when using ``recwarn`` under python2. pytest 3.9.1 (2018-10-16) @@ -1114,7 +1110,7 @@ pytest 3.9.1 (2018-10-16) Features -------- -- `#4159 `_: For test-suites containing test classes, the information about the subclassed +- `#4159 `__: 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"). @@ -1125,7 +1121,7 @@ pytest 3.9.0 (2018-10-15 - not published due to a release automation bug) Deprecations ------------ -- `#3616 `_: The following accesses have been documented as deprecated for years, but are now actually emitting deprecation warnings. +- `#3616 `__: 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:: @@ -1135,7 +1131,7 @@ Deprecations 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 `_. + 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 @@ -1149,121 +1145,121 @@ Deprecations getfuncargvalue is deprecated, use getfixturevalue -- `#3988 `_: Add a Deprecation warning for pytest.ensuretemp as it was deprecated since a while. +- `#3988 `__: Add a Deprecation warning for pytest.ensuretemp as it was deprecated since a while. Features -------- -- `#2293 `_: Improve usage errors messages by hiding internal details which can be distracting and noisy. +- `#2293 `__: 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. -- `#3332 `_: Improve the error displayed when a ``conftest.py`` file could not be imported. +- `#3332 `__: 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``). -- `#3849 `_: Add ``empty_parameter_set_mark=fail_at_collect`` ini option for raising an exception when parametrize collects an empty set. +- `#3849 `__: Add ``empty_parameter_set_mark=fail_at_collect`` ini option for raising an exception when parametrize collects an empty set. -- `#3964 `_: Log messages generated in the collection phase are shown when +- `#3964 `__: Log messages generated in the collection phase are shown when live-logging is enabled and/or when they are logged to a file. -- `#3985 `_: Introduce ``tmp_path`` as a fixture providing a Path object. Also introduce ``tmp_path_factory`` as +- `#3985 `__: Introduce ``tmp_path`` as a fixture providing a Path object. Also introduce ``tmp_path_factory`` as a session-scoped fixture for creating arbitrary temporary directories from any other fixture or test. -- `#4013 `_: Deprecation warnings are now shown even if you customize the warnings filters yourself. In the previous version +- `#4013 `__: 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. -- `#4073 `_: Allow specification of timeout for ``Testdir.runpytest_subprocess()`` and ``Testdir.run()``. +- `#4073 `__: Allow specification of timeout for ``Testdir.runpytest_subprocess()`` and ``Testdir.run()``. -- `#4098 `_: Add returncode argument to pytest.exit() to exit pytest with a specific return code. +- `#4098 `__: Add returncode argument to pytest.exit() to exit pytest with a specific return code. -- `#4102 `_: Reimplement ``pytest.deprecated_call`` using ``pytest.warns`` so it supports the ``match='...'`` keyword argument. +- `#4102 `__: 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``. -- `#4149 `_: Require setuptools>=30.3 and move most of the metadata to ``setup.cfg``. +- `#4149 `__: Require setuptools>=30.3 and move most of the metadata to ``setup.cfg``. Bug Fixes --------- -- `#2535 `_: Improve error message when test functions of ``unittest.TestCase`` subclasses use a parametrized fixture. +- `#2535 `__: Improve error message when test functions of ``unittest.TestCase`` subclasses use a parametrized fixture. -- `#3057 `_: ``request.fixturenames`` now correctly returns the name of fixtures created by ``request.getfixturevalue()``. +- `#3057 `__: ``request.fixturenames`` now correctly returns the name of fixtures created by ``request.getfixturevalue()``. -- `#3946 `_: Warning filters passed as command line options using ``-W`` now take precedence over filters defined in ``ini`` +- `#3946 `__: Warning filters passed as command line options using ``-W`` now take precedence over filters defined in ``ini`` configuration files. -- `#4066 `_: Fix source reindenting by using ``textwrap.dedent`` directly. +- `#4066 `__: Fix source reindenting by using ``textwrap.dedent`` directly. -- `#4102 `_: ``pytest.warn`` will capture previously-warned warnings in Python 2. Previously they were never raised. +- `#4102 `__: ``pytest.warn`` will capture previously-warned warnings in Python 2. Previously they were never raised. -- `#4108 `_: Resolve symbolic links for args. +- `#4108 `__: 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. -- `#4132 `_: Fix duplicate printing of internal errors when using ``--pdb``. +- `#4132 `__: Fix duplicate printing of internal errors when using ``--pdb``. -- `#4135 `_: pathlib based tmpdir cleanup now correctly handles symlinks in the folder. +- `#4135 `__: pathlib based tmpdir cleanup now correctly handles symlinks in the folder. -- `#4152 `_: Display the filename when encountering ``SyntaxWarning``. +- `#4152 `__: Display the filename when encountering ``SyntaxWarning``. Improved Documentation ---------------------- -- `#3713 `_: Update usefixtures documentation to clarify that it can't be used with fixture functions. +- `#3713 `__: Update usefixtures documentation to clarify that it can't be used with fixture functions. -- `#4058 `_: Update fixture documentation to specify that a fixture can be invoked twice in the scope it's defined for. +- `#4058 `__: Update fixture documentation to specify that a fixture can be invoked twice in the scope it's defined for. -- `#4064 `_: According to unittest.rst, setUpModule and tearDownModule were not implemented, but it turns out they are. So updated the documentation for unittest. +- `#4064 `__: According to unittest.rst, setUpModule and tearDownModule were not implemented, but it turns out they are. So updated the documentation for unittest. -- `#4151 `_: Add tempir testing example to CONTRIBUTING.rst guide +- `#4151 `__: Add tempir testing example to CONTRIBUTING.rst guide Trivial/Internal Changes ------------------------ -- `#2293 `_: The internal ``MarkerError`` exception has been removed. +- `#2293 `__: The internal ``MarkerError`` exception has been removed. -- `#3988 `_: Port the implementation of tmpdir to pathlib. +- `#3988 `__: Port the implementation of tmpdir to pathlib. -- `#4063 `_: Exclude 0.00 second entries from ``--duration`` output unless ``-vv`` is passed on the command-line. +- `#4063 `__: Exclude 0.00 second entries from ``--duration`` output unless ``-vv`` is passed on the command-line. -- `#4093 `_: Fixed formatting of string literals in internal tests. +- `#4093 `__: Fixed formatting of string literals in internal tests. pytest 3.8.2 (2018-10-02) @@ -1272,7 +1268,7 @@ pytest 3.8.2 (2018-10-02) Deprecations and Removals ------------------------- -- `#4036 `_: The ``item`` parameter of ``pytest_warning_captured`` hook is now documented as deprecated. We realized only after +- `#4036 `__: The ``item`` parameter of ``pytest_warning_captured`` hook is now documented as deprecated. We realized only after the ``3.8`` release that this parameter is incompatible with ``pytest-xdist``. Our policy is to not deprecate features during bug-fix releases, but in this case we believe it makes sense as we are @@ -1287,25 +1283,25 @@ Deprecations and Removals Bug Fixes --------- -- `#3539 `_: Fix reload on assertion rewritten modules. +- `#3539 `__: Fix reload on assertion rewritten modules. -- `#4034 `_: The ``.user_properties`` attribute of ``TestReport`` objects is a list +- `#4034 `__: The ``.user_properties`` attribute of ``TestReport`` objects is a list of (name, value) tuples, but could sometimes be instantiated as a tuple of tuples. It is now always a list. -- `#4039 `_: No longer issue warnings about using ``pytest_plugins`` in non-top-level directories when using ``--pyargs``: the +- `#4039 `__: No longer issue warnings about using ``pytest_plugins`` in non-top-level directories when using ``--pyargs``: the current ``--pyargs`` mechanism is not reliable and might give false negatives. -- `#4040 `_: Exclude empty reports for passed tests when ``-rP`` option is used. +- `#4040 `__: Exclude empty reports for passed tests when ``-rP`` option is used. -- `#4051 `_: Improve error message when an invalid Python expression is passed to the ``-m`` option. +- `#4051 `__: Improve error message when an invalid Python expression is passed to the ``-m`` option. -- `#4056 `_: ``MonkeyPatch.setenv`` and ``MonkeyPatch.delenv`` issue a warning if the environment variable name is not ``str`` on Python 2. +- `#4056 `__: ``MonkeyPatch.setenv`` and ``MonkeyPatch.delenv`` issue a warning if the environment variable name is not ``str`` on Python 2. In Python 2, adding ``unicode`` keys to ``os.environ`` causes problems with ``subprocess`` (and possible other modules), making this a subtle bug specially susceptible when used with ``from __future__ import unicode_literals``. @@ -1315,7 +1311,7 @@ Bug Fixes Improved Documentation ---------------------- -- `#3928 `_: Add possible values for fixture scope to docs. +- `#3928 `__: Add possible values for fixture scope to docs. pytest 3.8.1 (2018-09-22) @@ -1324,31 +1320,31 @@ pytest 3.8.1 (2018-09-22) Bug Fixes --------- -- `#3286 `_: ``.pytest_cache`` directory is now automatically ignored by Git. Users who would like to contribute a solution for other SCMs please consult/comment on this issue. +- `#3286 `__: ``.pytest_cache`` directory is now automatically ignored by Git. Users who would like to contribute a solution for other SCMs please consult/comment on this issue. -- `#3749 `_: Fix the following error during collection of tests inside packages:: +- `#3749 `__: Fix the following error during collection of tests inside packages:: TypeError: object of type 'Package' has no len() -- `#3941 `_: Fix bug where indirect parametrization would consider the scope of all fixtures used by the test function to determine the parametrization scope, and not only the scope of the fixtures being parametrized. +- `#3941 `__: Fix bug where indirect parametrization would consider the scope of all fixtures used by the test function to determine the parametrization scope, and not only the scope of the fixtures being parametrized. -- `#3973 `_: Fix crash of the assertion rewriter if a test changed the current working directory without restoring it afterwards. +- `#3973 `__: Fix crash of the assertion rewriter if a test changed the current working directory without restoring it afterwards. -- `#3998 `_: Fix issue that prevented some caplog properties (for example ``record_tuples``) from being available when entering the debugger with ``--pdb``. +- `#3998 `__: Fix issue that prevented some caplog properties (for example ``record_tuples``) from being available when entering the debugger with ``--pdb``. -- `#3999 `_: Fix ``UnicodeDecodeError`` in python2.x when a class returns a non-ascii binary ``__repr__`` in an assertion which also contains non-ascii text. +- `#3999 `__: Fix ``UnicodeDecodeError`` in python2.x when a class returns a non-ascii binary ``__repr__`` in an assertion which also contains non-ascii text. Improved Documentation ---------------------- -- `#3996 `_: New `Deprecations and Removals `_ page shows all currently +- `#3996 `__: New `Deprecations and Removals `__ page shows all currently deprecated features, the rationale to do so, and alternatives to update your code. It also list features removed from pytest in past major releases to help those with ancient pytest versions to upgrade. @@ -1357,10 +1353,10 @@ Improved Documentation Trivial/Internal Changes ------------------------ -- `#3955 `_: Improve pre-commit detection for changelog filenames +- `#3955 `__: Improve pre-commit detection for changelog filenames -- `#3975 `_: Remove legacy code around im_func as that was python2 only +- `#3975 `__: Remove legacy code around im_func as that was python2 only pytest 3.8.0 (2018-09-05) @@ -1369,11 +1365,11 @@ pytest 3.8.0 (2018-09-05) Deprecations and Removals ------------------------- -- `#2452 `_: ``Config.warn`` and ``Node.warn`` have been - deprecated, see ``_ for rationale and +- `#2452 `__: ``Config.warn`` and ``Node.warn`` have been + deprecated, see ``__ for rationale and examples. -- `#3936 `_: ``@pytest.mark.filterwarnings`` second parameter is no longer regex-escaped, +- `#3936 `__: ``@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 @@ -1384,60 +1380,60 @@ Deprecations and Removals Features -------- -- `#2452 `_: Internal pytest warnings are now issued using the standard ``warnings`` module, making it possible to use +- `#2452 `__: 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. Consult `the documentation `__ for more info. -- `#2908 `_: ``DeprecationWarning`` and ``PendingDeprecationWarning`` are now shown by default if no other warning filter is +- `#2908 `__: ``DeprecationWarning`` and ``PendingDeprecationWarning`` are now shown by default if no other warning filter is configured. This makes pytest more compliant with - `PEP-0506 `_. See - `the docs `_ for + `PEP-0506 `__. See + `the docs `__ for more info. -- `#3251 `_: Warnings are now captured and displayed during test collection. +- `#3251 `__: Warnings are now captured and displayed during test collection. -- `#3784 `_: ``PYTEST_DISABLE_PLUGIN_AUTOLOAD`` environment variable disables plugin auto-loading when set. +- `#3784 `__: ``PYTEST_DISABLE_PLUGIN_AUTOLOAD`` environment variable disables plugin auto-loading when set. -- `#3829 `_: Added the ``count`` option to ``console_output_style`` to enable displaying the progress as a count instead of a percentage. +- `#3829 `__: Added the ``count`` option to ``console_output_style`` to enable displaying the progress as a count instead of a percentage. -- `#3837 `_: Added support for 'xfailed' and 'xpassed' outcomes to the ``pytester.RunResult.assert_outcomes`` signature. +- `#3837 `__: Added support for 'xfailed' and 'xpassed' outcomes to the ``pytester.RunResult.assert_outcomes`` signature. Bug Fixes --------- -- `#3911 `_: Terminal writer now takes into account unicode character width when writing out progress. +- `#3911 `__: Terminal writer now takes into account unicode character width when writing out progress. -- `#3913 `_: Pytest now returns with correct exit code (EXIT_USAGEERROR, 4) when called with unknown arguments. +- `#3913 `__: Pytest now returns with correct exit code (EXIT_USAGEERROR, 4) when called with unknown arguments. -- `#3918 `_: Improve performance of assertion rewriting. +- `#3918 `__: Improve performance of assertion rewriting. Improved Documentation ---------------------- -- `#3566 `_: Added a blurb in usage.rst for the usage of -r flag which is used to show an extra test summary info. +- `#3566 `__: Added a blurb in usage.rst for the usage of -r flag which is used to show an extra test summary info. -- `#3907 `_: Corrected type of the exceptions collection passed to ``xfail``: ``raises`` argument accepts a ``tuple`` instead of ``list``. +- `#3907 `__: Corrected type of the exceptions collection passed to ``xfail``: ``raises`` argument accepts a ``tuple`` instead of ``list``. Trivial/Internal Changes ------------------------ -- `#3853 `_: Removed ``"run all (no recorded failures)"`` message printed with ``--failed-first`` and ``--last-failed`` when there are no failed tests. +- `#3853 `__: Removed ``"run all (no recorded failures)"`` message printed with ``--failed-first`` and ``--last-failed`` when there are no failed tests. pytest 3.7.4 (2018-08-29) @@ -1446,23 +1442,23 @@ pytest 3.7.4 (2018-08-29) Bug Fixes --------- -- `#3506 `_: Fix possible infinite recursion when writing ``.pyc`` files. +- `#3506 `__: Fix possible infinite recursion when writing ``.pyc`` files. -- `#3853 `_: Cache plugin now obeys the ``-q`` flag when ``--last-failed`` and ``--failed-first`` flags are used. +- `#3853 `__: Cache plugin now obeys the ``-q`` flag when ``--last-failed`` and ``--failed-first`` flags are used. -- `#3883 `_: Fix bad console output when using ``console_output_style=classic``. +- `#3883 `__: Fix bad console output when using ``console_output_style=classic``. -- `#3888 `_: Fix macOS specific code using ``capturemanager`` plugin in doctests. +- `#3888 `__: Fix macOS specific code using ``capturemanager`` plugin in doctests. Improved Documentation ---------------------- -- `#3902 `_: Fix pytest.org links +- `#3902 `__: Fix pytest.org links pytest 3.7.3 (2018-08-26) @@ -1471,52 +1467,52 @@ pytest 3.7.3 (2018-08-26) Bug Fixes --------- -- `#3033 `_: Fixtures during teardown can again use ``capsys`` and ``capfd`` to inspect output captured during tests. +- `#3033 `__: Fixtures during teardown can again use ``capsys`` and ``capfd`` to inspect output captured during tests. -- `#3773 `_: Fix collection of tests from ``__init__.py`` files if they match the ``python_files`` configuration option. +- `#3773 `__: Fix collection of tests from ``__init__.py`` files if they match the ``python_files`` configuration option. -- `#3796 `_: Fix issue where teardown of fixtures of consecutive sub-packages were executed once, at the end of the outer +- `#3796 `__: Fix issue where teardown of fixtures of consecutive sub-packages were executed once, at the end of the outer package. -- `#3816 `_: Fix bug where ``--show-capture=no`` option would still show logs printed during fixture teardown. +- `#3816 `__: Fix bug where ``--show-capture=no`` option would still show logs printed during fixture teardown. -- `#3819 `_: Fix ``stdout/stderr`` not getting captured when real-time cli logging is active. +- `#3819 `__: Fix ``stdout/stderr`` not getting captured when real-time cli logging is active. -- `#3843 `_: Fix collection error when specifying test functions directly in the command line using ``test.py::test`` syntax together with ``--doctest-modules``. +- `#3843 `__: Fix collection error when specifying test functions directly in the command line using ``test.py::test`` syntax together with ``--doctest-modules``. -- `#3848 `_: Fix bugs where unicode arguments could not be passed to ``testdir.runpytest`` on Python 2. +- `#3848 `__: Fix bugs where unicode arguments could not be passed to ``testdir.runpytest`` on Python 2. -- `#3854 `_: Fix double collection of tests within packages when the filename starts with a capital letter. +- `#3854 `__: Fix double collection of tests within packages when the filename starts with a capital letter. Improved Documentation ---------------------- -- `#3824 `_: Added example for multiple glob pattern matches in ``python_files``. +- `#3824 `__: Added example for multiple glob pattern matches in ``python_files``. -- `#3833 `_: Added missing docs for ``pytester.Testdir``. +- `#3833 `__: Added missing docs for ``pytester.Testdir``. -- `#3870 `_: Correct documentation for setuptools integration. +- `#3870 `__: Correct documentation for setuptools integration. Trivial/Internal Changes ------------------------ -- `#3826 `_: Replace broken type annotations with type comments. +- `#3826 `__: Replace broken type annotations with type comments. -- `#3845 `_: Remove a reference to issue `#568 `_ from the documentation, which has since been +- `#3845 `__: Remove a reference to issue `#568 `__ from the documentation, which has since been fixed. @@ -1526,32 +1522,32 @@ pytest 3.7.2 (2018-08-16) Bug Fixes --------- -- `#3671 `_: Fix ``filterwarnings`` not being registered as a builtin mark. +- `#3671 `__: Fix ``filterwarnings`` not being registered as a builtin mark. -- `#3768 `_, `#3789 `_: Fix test collection from packages mixed with normal directories. +- `#3768 `__, `#3789 `__: Fix test collection from packages mixed with normal directories. -- `#3771 `_: Fix infinite recursion during collection if a ``pytest_ignore_collect`` hook returns ``False`` instead of ``None``. +- `#3771 `__: Fix infinite recursion during collection if a ``pytest_ignore_collect`` hook returns ``False`` instead of ``None``. -- `#3774 `_: Fix bug where decorated fixtures would lose functionality (for example ``@mock.patch``). +- `#3774 `__: Fix bug where decorated fixtures would lose functionality (for example ``@mock.patch``). -- `#3775 `_: Fix bug where importing modules or other objects with prefix ``pytest_`` prefix would raise a ``PluginValidationError``. +- `#3775 `__: Fix bug where importing modules or other objects with prefix ``pytest_`` prefix would raise a ``PluginValidationError``. -- `#3788 `_: Fix ``AttributeError`` during teardown of ``TestCase`` subclasses which raise an exception during ``__init__``. +- `#3788 `__: Fix ``AttributeError`` during teardown of ``TestCase`` subclasses which raise an exception during ``__init__``. -- `#3804 `_: Fix traceback reporting for exceptions with ``__cause__`` cycles. +- `#3804 `__: Fix traceback reporting for exceptions with ``__cause__`` cycles. Improved Documentation ---------------------- -- `#3746 `_: Add documentation for ``metafunc.config`` that had been mistakenly hidden. +- `#3746 `__: Add documentation for ``metafunc.config`` that had been mistakenly hidden. pytest 3.7.1 (2018-08-02) @@ -1560,26 +1556,26 @@ pytest 3.7.1 (2018-08-02) Bug Fixes --------- -- `#3473 `_: Raise immediately if ``approx()`` is given an expected value of a type it doesn't understand (e.g. strings, nested dicts, etc.). +- `#3473 `__: Raise immediately if ``approx()`` is given an expected value of a type it doesn't understand (e.g. strings, nested dicts, etc.). -- `#3712 `_: Correctly represent the dimensions of a numpy array when calling ``repr()`` on ``approx()``. +- `#3712 `__: Correctly represent the dimensions of a numpy array when calling ``repr()`` on ``approx()``. -- `#3742 `_: Fix incompatibility with third party plugins during collection, which produced the error ``object has no attribute '_collectfile'``. +- `#3742 `__: Fix incompatibility with third party plugins during collection, which produced the error ``object has no attribute '_collectfile'``. -- `#3745 `_: Display the absolute path if ``cache_dir`` is not relative to the ``rootdir`` instead of failing. +- `#3745 `__: Display the absolute path if ``cache_dir`` is not relative to the ``rootdir`` instead of failing. -- `#3747 `_: Fix compatibility problem with plugins and the warning code issued by fixture functions when they are called directly. +- `#3747 `__: Fix compatibility problem with plugins and the warning code issued by fixture functions when they are called directly. -- `#3748 `_: Fix infinite recursion in ``pytest.approx`` with arrays in ``numpy<1.13``. +- `#3748 `__: Fix infinite recursion in ``pytest.approx`` with arrays in ``numpy<1.13``. -- `#3757 `_: Pin pathlib2 to ``>=2.2.0`` as we require ``__fspath__`` support. +- `#3757 `__: Pin pathlib2 to ``>=2.2.0`` as we require ``__fspath__`` support. -- `#3763 `_: Fix ``TypeError`` when the assertion message is ``bytes`` in python 3. +- `#3763 `__: Fix ``TypeError`` when the assertion message is ``bytes`` in python 3. pytest 3.7.0 (2018-07-30) @@ -1588,57 +1584,57 @@ pytest 3.7.0 (2018-07-30) Deprecations and Removals ------------------------- -- `#2639 `_: ``pytest_namespace`` has been `deprecated `_. +- `#2639 `__: ``pytest_namespace`` has been `deprecated `__. -- `#3661 `_: Calling a fixture function directly, as opposed to request them in a test function, now issues a ``RemovedInPytest4Warning``. See `the documentation for rationale and examples `_. +- `#3661 `__: Calling a fixture function directly, as opposed to request them in a test function, now issues a ``RemovedInPytest4Warning``. See `the documentation for rationale and examples `__. Features -------- -- `#2283 `_: New ``package`` fixture scope: fixtures are finalized when the last test of a *package* finishes. This feature is considered **experimental**, so use it sparingly. +- `#2283 `__: New ``package`` fixture scope: fixtures are finalized when the last test of a *package* finishes. This feature is considered **experimental**, so use it sparingly. -- `#3576 `_: ``Node.add_marker`` now supports an ``append=True/False`` parameter to determine whether the mark comes last (default) or first. +- `#3576 `__: ``Node.add_marker`` now supports an ``append=True/False`` parameter to determine whether the mark comes last (default) or first. -- `#3579 `_: 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. +- `#3579 `__: 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. -- `#3610 `_: New ``--trace`` option to enter the debugger at the start of a test. +- `#3610 `__: New ``--trace`` option to enter the debugger at the start of a test. -- `#3623 `_: Introduce ``pytester.copy_example`` as helper to do acceptance tests against examples from the project. +- `#3623 `__: Introduce ``pytester.copy_example`` as helper to do acceptance tests against examples from the project. Bug Fixes --------- -- `#2220 `_: 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. +- `#2220 `__: 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. -- `#3695 `_: Fix ``ApproxNumpy`` initialisation argument mixup, ``abs`` and ``rel`` tolerances were flipped causing strange comparison results. +- `#3695 `__: Fix ``ApproxNumpy`` initialisation argument mixup, ``abs`` and ``rel`` tolerances were flipped causing strange comparison results. Add tests to check ``abs`` and ``rel`` tolerances for ``np.array`` and test for expecting ``nan`` with ``np.array()`` -- `#980 `_: Fix truncated locals output in verbose mode. +- `#980 `__: Fix truncated locals output in verbose mode. Improved Documentation ---------------------- -- `#3295 `_: 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. +- `#3295 `__: 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 ------------------------ -- `#3519 `_: Now a ``README.md`` file is created in ``.pytest_cache`` to make it clear why the directory exists. +- `#3519 `__: Now a ``README.md`` file is created in ``.pytest_cache`` to make it clear why the directory exists. pytest 3.6.4 (2018-07-28) @@ -1647,25 +1643,25 @@ pytest 3.6.4 (2018-07-28) Bug Fixes --------- -- Invoke pytest using ``-mpytest`` so ``sys.path`` does not get polluted by packages installed in ``site-packages``. (`#742 `_) +- Invoke pytest using ``-mpytest`` so ``sys.path`` does not get polluted by packages installed in ``site-packages``. (`#742 `__) Improved Documentation ---------------------- -- Use ``smtp_connection`` instead of ``smtp`` in fixtures documentation to avoid possible confusion. (`#3592 `_) +- Use ``smtp_connection`` instead of ``smtp`` in fixtures documentation to avoid possible confusion. (`#3592 `__) Trivial/Internal Changes ------------------------ -- Remove obsolete ``__future__`` imports. (`#2319 `_) +- Remove obsolete ``__future__`` imports. (`#2319 `__) -- Add CITATION to provide information on how to formally cite pytest. (`#3402 `_) +- Add CITATION to provide information on how to formally cite pytest. (`#3402 `__) -- Replace broken type annotations with type comments. (`#3635 `_) +- Replace broken type annotations with type comments. (`#3635 `__) -- Pin ``pluggy`` to ``<0.8``. (`#3727 `_) +- Pin ``pluggy`` to ``<0.8``. (`#3727 `__) pytest 3.6.3 (2018-07-04) @@ -1676,20 +1672,20 @@ Bug Fixes - Fix ``ImportWarning`` triggered by explicit relative imports in assertion-rewritten package modules. (`#3061 - `_) + `__) - Fix error in ``pytest.approx`` when dealing with 0-dimension numpy - arrays. (`#3593 `_) + arrays. (`#3593 `__) - No longer raise ``ValueError`` when using the ``get_marker`` API. (`#3605 - `_) + `__) - Fix problem where log messages with non-ascii characters would not appear in the output log file. - (`#3630 `_) + (`#3630 `__) - No longer raise ``AttributeError`` when legacy marks can't be stored in - functions. (`#3631 `_) + functions. (`#3631 `__) Improved Documentation @@ -1697,7 +1693,7 @@ Improved Documentation - The description above the example for ``@pytest.mark.skipif`` now better matches the code. (`#3611 - `_) + `__) Trivial/Internal Changes @@ -1705,13 +1701,13 @@ Trivial/Internal Changes - Internal refactoring: removed unused ``CallSpec2tox ._globalid_args`` attribute and ``metafunc`` parameter from ``CallSpec2.copy()``. (`#3598 - `_) + `__) - Silence usage of ``reduce`` warning in Python 2 (`#3609 - `_) + `__) - Fix usage of ``attr.ib`` deprecated ``convert`` parameter. (`#3653 - `_) + `__) pytest 3.6.2 (2018-06-20) @@ -1722,42 +1718,42 @@ Bug Fixes - Fix regression in ``Node.add_marker`` by extracting the mark object of a ``MarkDecorator``. (`#3555 - `_) + `__) - Warnings without ``location`` were reported as ``None``. This is corrected to now report ````. (`#3563 - `_) + `__) - Continue to call finalizers in the stack when a finalizer in a former scope raises an exception. (`#3569 - `_) + `__) - Fix encoding error with ``print`` statements in doctests (`#3583 - `_) + `__) Improved Documentation ---------------------- - Add documentation for the ``--strict`` flag. (`#3549 - `_) + `__) Trivial/Internal Changes ------------------------ - Update old quotation style to parens in fixture.rst documentation. (`#3525 - `_) + `__) - Improve display of hint about ``--fulltrace`` with ``KeyboardInterrupt``. - (`#3545 `_) + (`#3545 `__) - pytest's testsuite is no longer runnable through ``python setup.py test`` -- instead invoke ``pytest`` or ``tox`` directly. (`#3552 - `_) + `__) - Fix typo in documentation (`#3567 - `_) + `__) pytest 3.6.1 (2018-06-05) @@ -1768,22 +1764,22 @@ Bug Fixes - Fixed a bug where stdout and stderr were logged twice by junitxml when a test was marked xfail. (`#3491 - `_) + `__) - Fix ``usefixtures`` mark applyed to unittest tests by correctly instantiating ``FixtureInfo``. (`#3498 - `_) + `__) - Fix assertion rewriter compatibility with libraries that monkey patch ``file`` objects. (`#3503 - `_) + `__) Improved Documentation ---------------------- - Added a section on how to use fixtures as factories to the fixture - documentation. (`#3461 `_) + documentation. (`#3461 `__) Trivial/Internal Changes @@ -1791,17 +1787,17 @@ Trivial/Internal Changes - Enable caching for pip/pre-commit in order to reduce build time on travis/appveyor. (`#3502 - `_) + `__) - Switch pytest to the src/ layout as we already suggested it for good practice - now we implement it as well. (`#3513 - `_) + `__) - Fix if in tests to support 3.7.0b5, where a docstring handling in AST got - reverted. (`#3530 `_) + reverted. (`#3530 `__) - Remove some python2.5 compatibility code. (`#3529 - `_) + `__) pytest 3.6.0 (2018-05-23) @@ -1815,34 +1811,34 @@ Features design. This introduces new ``Node.iter_markers(name)`` and ``Node.get_closest_marker(name)`` APIs. Users are **strongly encouraged** to read the `reasons for the revamp in the docs - `_, + `__, or jump over to details about `updating existing code to use the new APIs - `_. - (`#3317 `_) + `__. + (`#3317 `__) - Now when ``@pytest.fixture`` is applied more than once to the same function a ``ValueError`` is raised. This buggy behavior would cause surprising problems and if was working for a test suite it was mostly by accident. (`#2334 - `_) + `__) - Support for Python 3.7's builtin ``breakpoint()`` method, see `Using the builtin breakpoint function - `_ for - details. (`#3180 `_) + `__ for + details. (`#3180 `__) - ``monkeypatch`` now supports a ``context()`` function which acts as a context manager which undoes all patching done within the ``with`` block. (`#3290 - `_) + `__) - The ``--pdb`` option now causes KeyboardInterrupt to enter the debugger, instead of stopping the test session. On python 2.7, hitting CTRL+C again exits the debugger. On python 3.2 and higher, use CTRL+D. (`#3299 - `_) + `__) - pytest no longer changes the log level of the root logger when the ``log-level`` parameter has greater numeric value than that of the level of the root logger, which makes it play better with custom logging configuration - in user code. (`#3307 `_) + in user code. (`#3307 `__) Bug Fixes @@ -1850,15 +1846,15 @@ Bug Fixes - A rare race-condition which might result in corrupted ``.pyc`` files on Windows has been hopefully solved. (`#3008 - `_) + `__) - Also use iter_marker for discovering the marks applying for marker expressions from the cli to avoid the bad data from the legacy mark storage. - (`#3441 `_) + (`#3441 `__) - When showing diffs of failed assertions where the contents contain only whitespace, escape them using ``repr()`` first to make it easy to spot the - differences. (`#3443 `_) + differences. (`#3443 `__) Improved Documentation @@ -1866,28 +1862,28 @@ Improved Documentation - Change documentation copyright year to a range which auto-updates itself each time it is published. (`#3303 - `_) + `__) Trivial/Internal Changes ------------------------ - ``pytest`` now depends on the `python-atomicwrites - `_ library. (`#3008 - `_) + `__ library. (`#3008 + `__) - Update all pypi.python.org URLs to pypi.org. (`#3431 - `_) + `__) - Detect `pytest_` prefixed hooks using the internal plugin manager since ``pluggy`` is deprecating the ``implprefix`` argument to ``PluginManager``. - (`#3487 `_) + (`#3487 `__) - Import ``Mapping`` and ``Sequence`` from ``_pytest.compat`` instead of directly from ``collections`` in ``python_api.py::approx``. Add ``Mapping`` to ``_pytest.compat``, import it from ``collections`` on python 2, but from ``collections.abc`` on Python 3 to avoid a ``DeprecationWarning`` on Python - 3.7 or newer. (`#3497 `_) + 3.7 or newer. (`#3497 `__) pytest 3.5.1 (2018-04-23) @@ -1902,13 +1898,13 @@ Bug Fixes 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 `_) + argument. (`#3348 `__) - ``pytest.raises`` now works with exception classes that look like iterables. - (`#3372 `_) + (`#3372 `__) Improved Documentation @@ -1916,7 +1912,7 @@ Improved Documentation - Fix typo in ``caplog`` fixture documentation, which incorrectly identified certain attributes as methods. (`#3406 - `_) + `__) Trivial/Internal Changes @@ -1924,22 +1920,22 @@ 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 `_) + 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 - `_) + `__) pytest 3.5.0 (2018-03-21) @@ -1950,11 +1946,11 @@ Deprecations and Removals - ``record_xml_property`` fixture is now deprecated in favor of the more generic ``record_property``. (`#2770 - `_) + `__) - Defining ``pytest_plugins`` is now deprecated in non-top-level conftest.py - files, because they "leak" to the entire directory tree. `See the docs `_ for the rationale behind this decision (`#3084 - `_) + files, because they "leak" to the entire directory tree. `See the docs `__ for the rationale behind this decision (`#3084 + `__) Features @@ -1963,75 +1959,75 @@ 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`` (the default). (`#1478 - `_) + `__) - New ``--rootdir`` command-line option to override the rules for discovering the root directory. See `customize - `_ in the documentation for - details. (`#1642 `_) + `__ in the documentation for + details. (`#1642 `__) - 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. (`#2405 `_) + dependencies. (`#2405 `__) - ``record_xml_property`` renamed to ``record_property`` and is now compatible with xdist, markers and any reporter. ``record_xml_property`` name is now - deprecated. (`#2770 `_) + deprecated. (`#2770 `__) - 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. (`#3034 - `_) + `__) - 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). (`#3139 `_) + default). (`#3139 `__) - 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. (`#3149 `_) + failure. (`#3149 `__) - Captured log messages are added to the ```` 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 ````. The default value for ``junit_logging`` is ``no``, meaning captured logs are not written to the output file. (`#3156 - `_) + `__) - Allow the logging plugin to handle ``pytest_runtest_logstart`` and ``pytest_runtest_logfinish`` hooks when live logs are enabled. (`#3189 - `_) + `__) - Passing ``--log-cli-level`` in the command-line now automatically activates - live logging. (`#3190 `_) + live logging. (`#3190 `__) - Add command line option ``--deselect`` to allow deselection of individual tests at collection time. (`#3198 - `_) + `__) - Captured logs are printed before entering pdb. (`#3204 - `_) + `__) - Deselected item count is now shown before tests are run, e.g. ``collected X items / Y deselected``. (`#3213 - `_) + `__) - The builtin module ``platform`` is now available for use in expressions in ``pytest.mark``. (`#3236 - `_) + `__) - The *short test summary info* section now is displayed after tracebacks and warnings in the terminal. (`#3255 - `_) + `__) - New ``--verbosity`` flag to set verbosity level explicitly. (`#3296 - `_) + `__) - ``pytest.approx`` now accepts comparing a numpy array with a scalar. (`#3312 - `_) + `__) Bug Fixes @@ -2039,59 +2035,59 @@ Bug Fixes - Suppress ``IOError`` when closing the temporary file used for capturing streams in Python 2.7. (`#2370 - `_) + `__) - Fixed ``clear()`` method on ``caplog`` fixture which cleared ``records``, but not the ``text`` property. (`#3297 - `_) + `__) - 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. (`#3314 - `_) + `__) Improved Documentation ---------------------- -- Added a `reference `_ page - to the docs. (`#1713 `_) +- Added a `reference `__ page + to the docs. (`#1713 `__) Trivial/Internal Changes ------------------------ - Change minimum requirement of ``attrs`` to ``17.4.0``. (`#3228 - `_) + `__) - Renamed example directories so all tests pass when ran from the base - directory. (`#3245 `_) + directory. (`#3245 `__) - Internal ``mark.py`` module has been turned into a package. (`#3250 - `_) + `__) - ``pytest`` now depends on the `more-itertools - `_ package. (`#3265 - `_) + `__ package. (`#3265 + `__) - Added warning when ``[pytest]`` section is used in a ``.cfg`` file passed - with ``-c`` (`#3268 `_) + with ``-c`` (`#3268 `__) - ``nodeids`` can now be passed explicitly to ``FSCollector`` and ``Node`` - constructors. (`#3291 `_) + constructors. (`#3291 `__) - Internal refactoring of ``FormattedExcinfo`` to use ``attrs`` facilities and remove old support code for legacy Python versions. (`#3292 - `_) + `__) - Refactoring to unify how verbosity is handled internally. (`#3296 - `_) + `__) - Internal refactoring to better integrate with argparse. (`#3304 - `_) + `__) - Fix a python example when calling a fixture in doc/en/usage.rst (`#3308 - `_) + `__) pytest 3.4.2 (2018-03-04) @@ -2101,34 +2097,34 @@ Bug Fixes --------- - Removed progress information when capture option is ``no``. (`#3203 - `_) + `__) - Refactor check of bindir from ``exists`` to ``isdir``. (`#3241 - `_) + `__) - Fix ``TypeError`` issue when using ``approx`` with a ``Decimal`` value. - (`#3247 `_) + (`#3247 `__) - Fix reference cycle generated when using the ``request`` fixture. (`#3249 - `_) + `__) - ``[tool:pytest]`` sections in ``*.cfg`` files passed by the ``-c`` option are now properly recognized. (`#3260 - `_) + `__) Improved Documentation ---------------------- - Add logging plugin to plugins list. (`#3209 - `_) + `__) Trivial/Internal Changes ------------------------ - Fix minor typo in fixture.rst (`#3259 - `_) + `__) pytest 3.4.1 (2018-02-20) @@ -2139,23 +2135,23 @@ Bug Fixes - Move import of ``doctest.UnexpectedException`` to top-level to avoid possible errors when using ``--pdb``. (`#1810 - `_) + `__) - Added printing of captured stdout/stderr before entering pdb, and improved a test which was giving false negatives about output capturing. (`#3052 - `_) + `__) - Fix ordering of tests using parametrized fixtures which can lead to fixtures being created more than necessary. (`#3161 - `_) + `__) - Fix bug where logging happening at hooks outside of "test run" hooks would cause an internal error. (`#3184 - `_) + `__) - Detect arguments injected by ``unittest.mock.patch`` decorator correctly when pypi ``mock.patch`` is installed and imported. (`#3206 - `_) + `__) - Errors shown when a ``pytest.raises()`` with ``match=`` fails are now cleaner on what happened: When no exception was raised, the "matching '...'" part got @@ -2163,10 +2159,10 @@ Bug Fixes match. When a wrong exception was raised, it's now thrown (like ``pytest.raised()`` without ``match=`` would) instead of complaining about the unmatched text. (`#3222 - `_) + `__) - Fixed output capture handling in doctests on macOS. (`#985 - `_) + `__) Improved Documentation @@ -2174,7 +2170,7 @@ Improved Documentation - Add Sphinx parameter docs for ``match`` and ``message`` args to ``pytest.raises``. (`#3202 - `_) + `__) Trivial/Internal Changes @@ -2182,14 +2178,14 @@ Trivial/Internal Changes - pytest has changed the publication procedure and is now being published to PyPI directly from Travis. (`#3060 - `_) + `__) - Rename ``ParameterSet._for_parameterize()`` to ``_for_parametrize()`` in order to comply with the naming convention. (`#3166 - `_) + `__) - Skip failing pdb/doctest test on mac. (`#985 - `_) + `__) pytest 3.4.0 (2018-01-30) @@ -2200,7 +2196,7 @@ Deprecations and Removals - All pytest classes now subclass ``object`` for better Python 2/3 compatibility. This should not affect user code except in very rare edge cases. (`#2147 - `_) + `__) Features @@ -2211,61 +2207,61 @@ Features Valid options are ``skip`` (default) and ``xfail``. Note that it is planned to change the default to ``xfail`` in future releases as this is considered less error prone. (`#2527 - `_) + `__) - **Incompatible change**: after community feedback the `logging - `_ functionality has + `__ functionality has undergone some changes. Please consult the `logging documentation `_ - for details. (`#3013 `_) + for details. (`#3013 `__) - Console output falls back to "classic" mode when capturing is disabled (``-s``), otherwise the output gets garbled to the point of being useless. (`#3038 - `_) + `__) - New `pytest_runtest_logfinish `_ hook which is called when a test item has finished executing, analogous to `pytest_runtest_logstart - `_. - (`#3101 `_) + `__. + (`#3101 `__) - Improve performance when collecting tests using many fixtures. (`#3107 - `_) + `__) - New ``caplog.get_records(when)`` method which provides access to the captured records for the ``"setup"``, ``"call"`` and ``"teardown"`` - testing stages. (`#3117 `_) + testing stages. (`#3117 `__) - New fixture ``record_xml_attribute`` that allows modifying and inserting attributes on the ```` xml node in JUnit reports. (`#3130 - `_) + `__) - The default cache directory has been renamed from ``.cache`` to ``.pytest_cache`` after community feedback that the name ``.cache`` did not make it clear that it was used by pytest. (`#3138 - `_) + `__) - Colorize the levelname column in the live-log output. (`#3142 - `_) + `__) Bug Fixes --------- - Fix hanging pexpect test on MacOS by using flush() instead of wait(). - (`#2022 `_) + (`#2022 `__) - Fix restoring Python state after in-process pytest runs with the ``pytester`` plugin; this may break tests using multiple inprocess pytest runs if later ones depend on earlier ones leaking global interpreter - changes. (`#3016 `_) + changes. (`#3016 `__) - Fix skipping plugin reporting hook when test aborted before plugin setup - hook. (`#3074 `_) + hook. (`#3074 `__) - Fix progress percentage reported when tests fail during teardown. (`#3088 - `_) + `__) - **Incompatible change**: ``-o/--override`` option no longer eats all the remaining options, which can lead to surprising behavior: for example, @@ -2273,7 +2269,7 @@ Bug Fixes would be considered as part of the ``-o`` command-line argument. One consequence of this is that now multiple configuration overrides need multiple ``-o`` flags: ``pytest -o foo=1 -o bar=2``. (`#3103 - `_) + `__) Improved Documentation @@ -2281,28 +2277,28 @@ Improved Documentation - Document hooks (defined with ``historic=True``) which cannot be used with ``hookwrapper=True``. (`#2423 - `_) + `__) - Clarify that warning capturing doesn't change the warning filter by default. - (`#2457 `_) + (`#2457 `__) - Clarify a possible confusion when using pytest_fixture_setup with fixture functions that return None. (`#2698 - `_) + `__) - Fix the wording of a sentence on doctest flags used in pytest. (`#3076 - `_) + `__) - Prefer ``https://*.readthedocs.io`` over ``http://*.rtfd.org`` for links in the documentation. (`#3092 - `_) + `__) - Improve readability (wording, grammar) of Getting Started guide (`#3131 - `_) + `__) - Added note that calling pytest.main multiple times from the same process is not recommended because of import caching. (`#3143 - `_) + `__) Trivial/Internal Changes @@ -2311,17 +2307,17 @@ Trivial/Internal Changes - Show a simple and easy error when keyword expressions trigger a syntax error (for example, ``"-k foo and import"`` will show an error that you can not use the ``import`` keyword in expressions). (`#2953 - `_) + `__) - Change parametrized automatic test id generation to use the ``__name__`` attribute of functions instead of the fallback argument name plus counter. - (`#2976 `_) + (`#2976 `__) - Replace py.std with stdlib imports. (`#3067 - `_) + `__) - Corrected 'you' to 'your' in logging docs. (`#3129 - `_) + `__) pytest 3.3.2 (2017-12-25) @@ -2331,34 +2327,34 @@ Bug Fixes --------- - pytester: ignore files used to obtain current user metadata in the fd leak - detector. (`#2784 `_) + detector. (`#2784 `__) - Fix **memory leak** where objects returned by fixtures were never destructed by the garbage collector. (`#2981 - `_) + `__) - Fix conversion of pyargs to filename to not convert symlinks on Python 2. (`#2985 - `_) + `__) - ``PYTEST_DONT_REWRITE`` is now checked for plugins too rather than only for - test modules. (`#2995 `_) + test modules. (`#2995 `__) Improved Documentation ---------------------- - Add clarifying note about behavior of multiple parametrized arguments (`#3001 - `_) + `__) Trivial/Internal Changes ------------------------ -- Code cleanup. (`#3015 `_, - `#3021 `_) +- Code cleanup. (`#3015 `__, + `#3021 `__) - Clean up code by replacing imports and references of ``_ast`` to ``ast``. - (`#3018 `_) + (`#3018 `__) pytest 3.3.1 (2017-12-05) @@ -2368,39 +2364,39 @@ Bug Fixes --------- - Fix issue about ``-p no:`` having no effect. (`#2920 - `_) + `__) - Fix regression with warnings that contained non-strings in their arguments in - Python 2. (`#2956 `_) + Python 2. (`#2956 `__) - Always escape null bytes when setting ``PYTEST_CURRENT_TEST``. (`#2957 - `_) + `__) - Fix ``ZeroDivisionError`` when using the ``testmon`` plugin when no tests were actually collected. (`#2971 - `_) + `__) - Bring back ``TerminalReporter.writer`` as an alias to ``TerminalReporter._tw``. This alias was removed by accident in the ``3.3.0`` - release. (`#2984 `_) + release. (`#2984 `__) - The ``pytest-capturelog`` plugin is now also blacklisted, avoiding errors when running pytest with it still installed. (`#3004 - `_) + `__) Improved Documentation ---------------------- - Fix broken link to plugin ``pytest-localserver``. (`#2963 - `_) + `__) Trivial/Internal Changes ------------------------ - Update github "bugs" link in ``CONTRIBUTING.rst`` (`#2949 - `_) + `__) pytest 3.3.0 (2017-11-23) @@ -2414,24 +2410,24 @@ Deprecations and Removals 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``. (`#2812 - `_) + `__) - Remove internal ``_preloadplugins()`` function. This removal is part of the ``pytest_namespace()`` hook deprecation. (`#2636 - `_) + `__) - 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. (`#2672 - `_) + `__) - Remove ParameterSet.deprecated_arg_dict - its not a public api and the lack of the underscore was a naming error. (`#2675 - `_) + `__) - Remove the internal multi-typed attribute ``Node._evalskip`` and replace it with the boolean ``Node._skipped_by_mark``. (`#2767 - `_) + `__) - The ``params`` list passed to ``pytest.fixture`` is now for all effects considered immutable and frozen at the moment of the ``pytest.fixture`` @@ -2445,23 +2441,23 @@ Features -------- - ``pytest_fixture_post_finalizer`` hook can now receive a ``request`` - argument. (`#2124 `_) + argument. (`#2124 `__) - 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. (`#2267 - `_) + `__) - Report tests with global ``pytestmark`` variable only once. (`#2549 - `_) + `__) - 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``. (`#2657 `_) + setting to ``classic``. (`#2657 `__) - Match ``warns`` signature to ``raises`` by adding ``match`` keyword. (`#2708 - `_) + `__) - pytest now captures and displays output from the standard ``logging`` module. The user can control the logging level to be captured by specifying options @@ -2469,80 +2465,80 @@ Features 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 + `__. This feature was introduced by merging the popular `pytest-catchlog - `_ plugin, thanks to `Thomas Hisch - `_. Be advised that during the merging the + `__ plugin, thanks to `Thomas Hisch + `__. Be advised that during the merging the backward compatibility interface with the defunct ``pytest-capturelog`` has - been dropped. (`#2794 `_) + been dropped. (`#2794 `__) - Add ``allow_module_level`` kwarg to ``pytest.skip()``, enabling to skip the - whole module. (`#2808 `_) + whole module. (`#2808 `__) - Allow setting ``file_or_dir``, ``-c``, and ``-o`` in PYTEST_ADDOPTS. (`#2824 - `_) + `__) - Return stdout/stderr capture results as a ``namedtuple``, so ``out`` and ``err`` can be accessed by attribute. (`#2879 - `_) + `__) - Add ``capfdbinary``, a version of ``capfd`` which returns bytes from ``readouterr()``. (`#2923 - `_) + `__) - Add ``capsysbinary`` a version of ``capsys`` which returns bytes from ``readouterr()``. (`#2934 - `_) + `__) - Implement feature to skip ``setup.py`` files when run with ``--doctest-modules``. (`#502 - `_) + `__) Bug Fixes --------- - Resume output capturing after ``capsys/capfd.disabled()`` context manager. - (`#1993 `_) + (`#1993 `__) - ``pytest_fixture_setup`` and ``pytest_fixture_post_finalizer`` hooks are now called for all ``conftest.py`` files. (`#2124 - `_) + `__) - If an exception happens while loading a plugin, pytest no longer hides the original traceback. In Python 2 it will show the original traceback with a new message that explains in which plugin. In Python 3 it will show 2 canonized exceptions, the original exception while loading the plugin in addition to an exception that pytest throws about loading a plugin. (`#2491 - `_) + `__) - ``capsys`` and ``capfd`` can now be used by other fixtures. (`#2709 - `_) + `__) - Internal ``pytester`` plugin properly encodes ``bytes`` arguments to - ``utf-8``. (`#2738 `_) + ``utf-8``. (`#2738 `__) - ``testdir`` now uses use the same method used by ``tmpdir`` to create its temporary directory. This changes the final structure of the ``testdir`` directory slightly, but should not affect usage in normal scenarios and avoids a number of potential problems. (`#2751 - `_) + `__) - pytest no longer complains about warnings with unicode messages being non-ascii compatible even for ascii-compatible messages. As a result of this, warnings with unicode messages are converted first to an ascii representation - for safety. (`#2809 `_) + for safety. (`#2809 `__) - Change return value of pytest command when ``--maxfail`` is reached from ``2`` (interrupted) to ``1`` (failed). (`#2845 - `_) + `__) - Fix issue in assertion rewriting which could lead it to rewrite modules which should not be rewritten. (`#2939 - `_) + `__) - Handle marks without description in ``pytest.ini``. (`#2942 - `_) + `__) Trivial/Internal Changes @@ -2550,34 +2546,34 @@ Trivial/Internal Changes - pytest now depends on `attrs `__ for internal structures to ease code maintainability. (`#2641 - `_) + `__) - Refactored internal Python 2/3 compatibility code to use ``six``. (`#2642 - `_) + `__) - Stop vendoring ``pluggy`` - we're missing out on its latest changes for not - much benefit (`#2719 `_) + much benefit (`#2719 `__) - Internal refactor: simplify ascii string escaping by using the backslashreplace error handler in newer Python 3 versions. (`#2734 - `_) + `__) - Remove unnecessary mark evaluator in unittest plugin (`#2767 - `_) + `__) - Calls to ``Metafunc.addcall`` now emit a deprecation warning. This function is scheduled to be removed in ``pytest-4.0``. (`#2876 - `_) + `__) - Internal move of the parameterset extraction to a more maintainable place. - (`#2877 `_) + (`#2877 `__) - Internal refactoring to simplify scope node lookup. (`#2910 - `_) + `__) - Configure ``pytest`` to prevent pip from installing pytest in unsupported Python versions. (`#2922 - `_) + `__) pytest 3.2.5 (2017-11-15) @@ -2588,7 +2584,7 @@ Bug Fixes - Remove ``py<1.5`` restriction from ``pytest`` as this can cause version conflicts in some installations. (`#2926 - `_) + `__) pytest 3.2.4 (2017-11-13) @@ -2599,45 +2595,45 @@ Bug Fixes - Fix the bug where running with ``--pyargs`` will result in items with empty ``parent.nodeid`` if run from a different root directory. (`#2775 - `_) + `__) - Fix issue with ``@pytest.parametrize`` if argnames was specified as keyword arguments. - (`#2819 `_) + (`#2819 `__) - Strip whitespace from marker names when reading them from INI config. (`#2856 - `_) + `__) - Show full context of doctest source in the pytest output, if the line number of failed example in the docstring is < 9. (`#2882 - `_) + `__) - Match fixture paths against actual path segments in order to avoid matching folders which share a prefix. - (`#2836 `_) + (`#2836 `__) Improved Documentation ---------------------- - Introduce a dedicated section about conftest.py. (`#1505 - `_) + `__) - Explicitly mention ``xpass`` in the documentation of ``xfail``. (`#1997 - `_) + `__) - Append example for pytest.param in the example/parametrize document. (`#2658 - `_) + `__) - Clarify language of proposal for fixtures parameters (`#2893 - `_) + `__) - List python 3.6 in the documented supported versions in the getting started - document. (`#2903 `_) + document. (`#2903 `__) - Clarify the documentation of available fixture scopes. (`#538 - `_) + `__) - Add documentation about the ``python -m pytest`` invocation adding the current directory to sys.path. (`#911 - `_) + `__) pytest 3.2.3 (2017-10-03) @@ -2647,15 +2643,15 @@ Bug Fixes --------- - Fix crash in tab completion when no prefix is given. (`#2748 - `_) + `__) - The equality checking function (``__eq__``) of ``MarkDecorator`` returns ``False`` if one object is not an instance of ``MarkDecorator``. (`#2758 - `_) + `__) - When running ``pytest --fixtures-per-test``: don't crash if an item has no _fixtureinfo attribute (e.g. doctests) (`#2788 - `_) + `__) Improved Documentation @@ -2663,10 +2659,10 @@ Improved Documentation - In help text of ``-k`` option, add example of using ``not`` to not select certain tests whose names match the provided expression. (`#1442 - `_) + `__) - Add note in ``parametrize.rst`` about calling ``metafunc.parametrize`` - multiple times. (`#1548 `_) + multiple times. (`#1548 `__) Trivial/Internal Changes @@ -2674,10 +2670,10 @@ Trivial/Internal Changes - Set ``xfail_strict=True`` in pytest's own test suite to catch expected failures as soon as they start to pass. (`#2722 - `_) + `__) - Fix typo in example of passing a callable to markers (in example/markers.rst) - (`#2765 `_) + (`#2765 `__) pytest 3.2.2 (2017-09-06) @@ -2687,17 +2683,17 @@ Bug Fixes --------- - Calling the deprecated ``request.getfuncargvalue()`` now shows the source of - the call. (`#2681 `_) + the call. (`#2681 `__) - Allow tests declared as ``@staticmethod`` to use fixtures. (`#2699 - `_) + `__) - Fixed edge-case during collection: attributes which raised ``pytest.fail`` when accessed would abort the entire collection. (`#2707 - `_) + `__) - Fix ``ReprFuncArgs`` with mixed unicode and UTF-8 args. (`#2731 - `_) + `__) Improved Documentation @@ -2706,25 +2702,25 @@ Improved Documentation - In examples on working with custom markers, add examples demonstrating the usage of ``pytest.mark.MARKER_NAME.with_args`` in comparison with ``pytest.mark.MARKER_NAME.__call__`` (`#2604 - `_) + `__) - In one of the simple examples, use ``pytest_collection_modifyitems()`` to skip tests based on a command-line option, allowing its sharing while preventing a user error when acessing ``pytest.config`` before the argument parsing. - (`#2653 `_) + (`#2653 `__) Trivial/Internal Changes ------------------------ - Fixed minor error in 'Good Practices/Manual Integration' code snippet. - (`#2691 `_) + (`#2691 `__) - Fixed typo in goodpractices.rst. (`#2721 - `_) + `__) - Improve user guidance regarding ``--resultlog`` deprecation. (`#2739 - `_) + `__) pytest 3.2.1 (2017-08-08) @@ -2734,27 +2730,27 @@ Bug Fixes --------- - Fixed small terminal glitch when collecting a single test item. (`#2579 - `_) + `__) - Correctly consider ``/`` as the file separator to automatically mark plugin files for rewrite on Windows. (`#2591 `_) + dev/pytest/issues/2591>`__) - Properly escape test names when setting ``PYTEST_CURRENT_TEST`` environment - variable. (`#2644 `_) + variable. (`#2644 `__) - Fix error on Windows and Python 3.6+ when ``sys.stdout`` has been replaced with a stream-like object which does not implement the full ``io`` module buffer protocol. In particular this affects ``pytest-xdist`` users on the aforementioned platform. (`#2666 `_) + dev/pytest/issues/2666>`__) Improved Documentation ---------------------- - Explicitly document which pytest features work with ``unittest``. (`#2626 - `_) + `__) pytest 3.2.0 (2017-07-30) @@ -2765,80 +2761,80 @@ Deprecations and Removals - ``pytest.approx`` no longer supports ``>``, ``>=``, ``<`` and ``<=`` operators to avoid surprising/inconsistent behavior. See `the approx docs - `_ for more - information. (`#2003 `_) + `__ for more + information. (`#2003 `__) - 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. (`#2147 - `_) + `__) - A deprecation warning is now raised when using marks for parameters in ``pytest.mark.parametrize``. Use ``pytest.param`` to apply marks to - parameters instead. (`#2427 `_) + parameters instead. (`#2427 `__) Features -------- - Add support for numpy arrays (and dicts) to approx. (`#1994 - `_) + `__) - 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. (`#2516 `_) + dev/pytest/issues/2516>`__) - Collection ignores local virtualenvs by default; ``--collect-in-virtualenv`` overrides this behavior. (`#2518 `_) + dev/pytest/issues/2518>`__) - 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.) (`#2528 `_) + dev/pytest/issues/2528>`__) - Introduce ``mark.with_args`` in order to allow passing functions/classes as sole argument to marks. (`#2540 `_) + dev/pytest/issues/2540>`__) - 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. (`#2543 `_) + runtime. (`#2543 `__) - 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. (`#2583 `_) + environment-variable>`__ for more info. (`#2583 `__) - 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. (`#2598 `_) + filterwarnings>`__ for more information. (`#2598 `__) - ``--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. (`#2621 - `_) + `__) - New ``pytest_report_collectionfinish`` hook which allows plugins to add messages to the terminal reporting after collection has been finished - successfully. (`#2622 `_) + successfully. (`#2622 `__) - 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. (`#2631 - `_) + `__) - Exceptions raised by ``pytest.fail``, ``pytest.skip`` and ``pytest.xfail`` now subclass BaseException, making them harder to be caught unintentionally - by normal code. (`#580 `_) + by normal code. (`#580 `__) Bug Fixes @@ -2846,43 +2842,43 @@ Bug Fixes - Set ``stdin`` to a closed ``PIPE`` in ``pytester.py.Testdir.popen()`` for avoid unwanted interactive ``pdb`` (`#2023 `_) + dev/pytest/issues/2023>`__) - Add missing ``encoding`` attribute to ``sys.std*`` streams when using ``capsys`` capture mode. (`#2375 `_) + dev/pytest/issues/2375>`__) - Fix terminal color changing to black on Windows if ``colorama`` is imported in a ``conftest.py`` file. (`#2510 `_) + dev/pytest/issues/2510>`__) - Fix line number when reporting summary of skipped tests. (`#2548 - `_) + `__) - capture: ensure that EncodedFile.name is a string. (`#2555 - `_) + `__) - The options ``--fixtures`` and ``--fixtures-per-test`` will now keep indentation within docstrings. (`#2574 `_) + dev/pytest/issues/2574>`__) - doctests line numbers are now reported correctly, fixing `pytest-sugar#122 - `_. (`#2610 - `_) + `__. (`#2610 + `__) - Fix non-determinism in order of fixture collection. Adds new dependency (ordereddict) for Python 2.6. (`#920 `_) + dev/pytest/issues/920>`__) Improved Documentation ---------------------- - Clarify ``pytest_configure`` hook call order. (`#2539 - `_) + `__) - Extend documentation for testing plugin code with the ``pytester`` plugin. - (`#971 `_) + (`#971 `__) Trivial/Internal Changes @@ -2890,37 +2886,37 @@ Trivial/Internal Changes - Update help message for ``--strict`` to make it clear it only deals with unregistered markers, not warnings. (`#2444 `_) + dev/pytest/issues/2444>`__) - Internal code move: move code for pytest.approx/pytest.raises to own files in order to cut down the size of python.py (`#2489 `_) + dev/pytest/issues/2489>`__) - Renamed the utility function ``_pytest.compat._escape_strings`` to ``_ascii_escaped`` to better communicate the function's purpose. (`#2533 - `_) + `__) - Improve error message for CollectError with skip/skipif. (`#2546 - `_) + `__) - Emit warning about ``yield`` tests being deprecated only once per generator. - (`#2562 `_) + (`#2562 `__) - Ensure final collected line doesn't include artifacts of previous write. - (`#2571 `_) + (`#2571 `__) - Fixed all flake8 errors and warnings. (`#2581 `_) + dev/pytest/issues/2581>`__) - Added ``fix-lint`` tox environment to run automatic pep8 fixes on the code. - (`#2582 `_) + (`#2582 `__) - Turn warnings into errors in pytest's own test suite in order to catch regressions due to deprecations more promptly. (`#2588 - `_) + `__) - Show multiple issue links in CHANGELOG entries. (`#2620 - `_) + `__) pytest 3.1.3 (2017-07-03) @@ -2930,43 +2926,43 @@ Bug Fixes --------- - Fix decode error in Python 2 for doctests in docstrings. (`#2434 - `_) + `__) - Exceptions raised during teardown by finalizers are now suppressed until all finalizers are called, with the initial exception reraised. (`#2440 - `_) + `__) - Fix incorrect "collected items" report when specifying tests on the command- - line. (`#2464 `_) + line. (`#2464 `__) - ``deprecated_call`` in context-manager form now captures deprecation warnings even if the same warning has already been raised. Also, ``deprecated_call`` will always produce the same error message (previously it would produce different messages in context-manager vs. function-call mode). (`#2469 - `_) + `__) - Fix issue where paths collected by pytest could have triple leading ``/`` - characters. (`#2475 `_) + characters. (`#2475 `__) - Fix internal error when trying to detect the start of a recursive traceback. - (`#2486 `_) + (`#2486 `__) Improved Documentation ---------------------- - Explicitly state for which hooks the calls stop after the first non-None - result. (`#2493 `_) + result. (`#2493 `__) Trivial/Internal Changes ------------------------ - Create invoke tasks for updating the vendored packages. (`#2474 - `_) + `__) - Update copyright dates in LICENSE, README.rst and in the documentation. - (`#2499 `_) + (`#2499 `__) pytest 3.1.2 (2017-06-08) @@ -3047,7 +3043,7 @@ New Features [pytest] addopts = -p no:warnings - See the `warnings documentation page `_ for more + See the `warnings documentation page `__ for more information. Thanks `@nicoddemus`_ for the PR. @@ -4002,14 +3998,14 @@ time or change existing behaviors in order to make them less surprising/more use * Improve error message when a plugin fails to load. Thanks `@nicoddemus`_ for the PR. -* Fix (`#1178 `_): +* Fix (`#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 `_): SyntaxErrors +* Fix (`#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. @@ -4066,7 +4062,7 @@ time or change existing behaviors in order to make them less surprising/more use **Changes** -* **Important**: `py.code `_ has been +* **Important**: `py.code `__ 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 @@ -4079,7 +4075,7 @@ time or change existing behaviors in order to make them less surprising/more use **experimental**, so you definitely should not import it explicitly! Please note that the original ``py.code`` is still available in - `pylib `_. + `pylib `__. * ``pytest_enter_pdb`` now optionally receives the pytest config object. Thanks `@nicoddemus`_ for the PR. @@ -6585,3 +6581,5 @@ serve as a reference for developers. 52001] * removed sorted() call for py.apigen tests in favour of [].sort() to support Python 2.3 [52481] + +.. _pdb++: https://pypi.org/project/pdbpp/ diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index 3124afc68ca..b334c1b244c 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -43,7 +43,7 @@ pytest 5.3.5 (2020-01-29) Bug Fixes --------- -- `#6517 `_: Fix regression in pytest 5.3.4 causing an INTERNALERROR due to a wrong assertion. +- `#6517 `__: Fix regression in pytest 5.3.4 causing an INTERNALERROR due to a wrong assertion. pytest 5.3.4 (2020-01-20) @@ -52,7 +52,7 @@ pytest 5.3.4 (2020-01-20) Bug Fixes --------- -- `#6496 `_: Revert `#6436 `__: unfortunately this change has caused a number of regressions in many suites, +- `#6496 `__: Revert `#6436 `__: unfortunately this change has caused a number of regressions in many suites, so the team decided to revert this change and make a new release while we continue to look for a solution. @@ -62,26 +62,26 @@ pytest 5.3.3 (2020-01-16) Bug Fixes --------- -- `#2780 `_: Captured output during teardown is shown with ``-rP``. +- `#2780 `__: Captured output during teardown is shown with ``-rP``. -- `#5971 `_: Fix a ``pytest-xdist`` crash when dealing with exceptions raised in subprocesses created by the +- `#5971 `__: Fix a ``pytest-xdist`` crash when dealing with exceptions raised in subprocesses created by the ``multiprocessing`` module. -- `#6436 `_: :class:`FixtureDef <_pytest.fixtures.FixtureDef>` objects now properly register their finalizers with autouse and +- `#6436 `__: :class:`FixtureDef <_pytest.fixtures.FixtureDef>` objects now properly register their finalizers with autouse and parameterized fixtures that execute before them in the fixture stack so they are torn down at the right times, and in the right order. -- `#6532 `_: Fix parsing of outcomes containing multiple errors with ``testdir`` results (regression in 5.3.0). +- `#6532 `__: Fix parsing of outcomes containing multiple errors with ``testdir`` results (regression in 5.3.0). Trivial/Internal Changes ------------------------ -- `#6350 `_: Optimized automatic renaming of test parameter IDs. +- `#6350 `__: Optimized automatic renaming of test parameter IDs. pytest 5.3.2 (2019-12-13) @@ -90,7 +90,7 @@ pytest 5.3.2 (2019-12-13) Improvements ------------ -- `#4639 `_: Revert "A warning is now issued when assertions are made for ``None``". +- `#4639 `__: 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. @@ -100,13 +100,13 @@ Improvements Bug Fixes --------- -- `#5430 `_: junitxml: Logs for failed test are now passed to junit report in case the test fails during call phase. +- `#5430 `__: junitxml: Logs for failed test are now passed to junit report in case the test fails during call phase. -- `#6290 `_: The supporting files in the ``.pytest_cache`` directory are kept with ``--cache-clear``, which only clears cached values now. +- `#6290 `__: The supporting files in the ``.pytest_cache`` directory are kept with ``--cache-clear``, which only clears cached values now. -- `#6301 `_: Fix assertion rewriting for egg-based distributions and ``editable`` installs (``pip install --editable``). +- `#6301 `__: Fix assertion rewriting for egg-based distributions and ``editable`` installs (``pip install --editable``). pytest 5.3.1 (2019-11-25) @@ -115,26 +115,26 @@ pytest 5.3.1 (2019-11-25) Improvements ------------ -- `#6231 `_: Improve check for misspelling of :ref:`pytest.mark.parametrize ref`. +- `#6231 `__: Improve check for misspelling of :ref:`pytest.mark.parametrize ref`. -- `#6257 `_: Handle :py:func:`_pytest.outcomes.exit` being used via :py:func:`~_pytest.hookspec.pytest_internalerror`, e.g. when quitting pdb from post mortem. +- `#6257 `__: Handle :py:func:`_pytest.outcomes.exit` being used via :py:func:`~_pytest.hookspec.pytest_internalerror`, e.g. when quitting pdb from post mortem. Bug Fixes --------- -- `#5914 `_: pytester: fix :py:func:`~_pytest.pytester.LineMatcher.no_fnmatch_line` when used after positive matching. +- `#5914 `__: pytester: fix :py:func:`~_pytest.pytester.LineMatcher.no_fnmatch_line` when used after positive matching. -- `#6082 `_: Fix line detection for doctest samples inside :py:class:`python:property` docstrings, as a workaround to `bpo-17446 `__. +- `#6082 `__: Fix line detection for doctest samples inside :py:class:`python:property` docstrings, as a workaround to `bpo-17446 `__. -- `#6254 `_: Fix compatibility with pytest-parallel (regression in pytest 5.3.0). +- `#6254 `__: Fix compatibility with pytest-parallel (regression in pytest 5.3.0). -- `#6255 `_: Clear the :py:data:`sys.last_traceback`, :py:data:`sys.last_type` +- `#6255 `__: Clear the :py:data:`sys.last_traceback`, :py:data:`sys.last_type` and :py:data:`sys.last_value` attributes by deleting them instead of setting them to ``None``. This better matches the behaviour of the Python standard library. @@ -146,7 +146,7 @@ pytest 5.3.0 (2019-11-19) Deprecations ------------ -- `#6179 `_: The default value of :confval:`junit_family` option will change to ``"xunit2"`` in pytest 6.0, given +- `#6179 `__: The default value of :confval:`junit_family` option will change to ``"xunit2"`` in pytest 6.0, given that this is the version supported by default in modern tools that manipulate this type of file. In order to smooth the transition, pytest will issue a warning in case the ``--junitxml`` option @@ -159,7 +159,7 @@ Deprecations Features -------- -- `#4488 `_: The pytest team has created the `pytest-reportlog `__ +- `#4488 `__: The pytest team has created the `pytest-reportlog `__ plugin, which provides a new ``--report-log=FILE`` option that writes *report logs* into a file as the test session executes. Each line of the report log contains a self contained JSON object corresponding to a testing event, @@ -171,12 +171,12 @@ Features provide feedback. -- `#4730 `_: When :py:data:`sys.pycache_prefix` (Python 3.8+) is set, it will be used by pytest to cache test files changed by the assertion rewriting mechanism. +- `#4730 `__: When :py:data:`sys.pycache_prefix` (Python 3.8+) is set, it will be used by pytest to cache test files changed by the assertion rewriting mechanism. This makes it easier to benefit of cached ``.pyc`` files even on file systems without permissions. -- `#5515 `_: Allow selective auto-indentation of multiline log messages. +- `#5515 `__: Allow selective auto-indentation of multiline log messages. Adds command line option ``--log-auto-indent``, config option :confval:`log_auto_indent` and support for per-entry configuration of @@ -189,7 +189,7 @@ Features rather than implicitly. -- `#5914 `_: :fixture:`testdir` learned two new functions, :py:func:`~_pytest.pytester.LineMatcher.no_fnmatch_line` and +- `#5914 `__: :fixture:`testdir` learned two new functions, :py:func:`~_pytest.pytester.LineMatcher.no_fnmatch_line` and :py:func:`~_pytest.pytester.LineMatcher.no_re_match_line`. The functions are used to ensure the captured text *does not* match the given @@ -212,12 +212,12 @@ Features But the new functions produce best output on failure. -- `#6057 `_: Added tolerances to complex values when printing ``pytest.approx``. +- `#6057 `__: Added tolerances to complex values when printing ``pytest.approx``. For example, ``repr(pytest.approx(3+4j))`` returns ``(3+4j) ± 5e-06 ∠ ±180°``. This is polar notation indicating a circle around the expected value, with a radius of 5e-06. For ``approx`` comparisons to return ``True``, the actual value should fall within this circle. -- `#6061 `_: Added the pluginmanager as an argument to ``pytest_addoption`` +- `#6061 `__: Added the pluginmanager as an argument to ``pytest_addoption`` so that hooks can be invoked when setting up command line options. This is useful for having one plugin communicate things to another plugin, such as default values or which set of command line options to add. @@ -227,13 +227,13 @@ Features Improvements ------------ -- `#5061 `_: Use multiple colors with terminal summary statistics. +- `#5061 `__: Use multiple colors with terminal summary statistics. -- `#5630 `_: Quitting from debuggers is now properly handled in ``doctest`` items. +- `#5630 `__: Quitting from debuggers is now properly handled in ``doctest`` items. -- `#5924 `_: Improved verbose diff output with sequences. +- `#5924 `__: Improved verbose diff output with sequences. Before: @@ -269,80 +269,80 @@ Improvements E ] -- `#5934 `_: ``repr`` of ``ExceptionInfo`` objects has been improved to honor the ``__repr__`` method of the underlying exception. +- `#5934 `__: ``repr`` of ``ExceptionInfo`` objects has been improved to honor the ``__repr__`` method of the underlying exception. -- `#5936 `_: Display untruncated assertion message with ``-vv``. +- `#5936 `__: Display untruncated assertion message with ``-vv``. -- `#5990 `_: Fixed plurality mismatch in test summary (e.g. display "1 error" instead of "1 errors"). +- `#5990 `__: Fixed plurality mismatch in test summary (e.g. display "1 error" instead of "1 errors"). -- `#6008 `_: ``Config.InvocationParams.args`` is now always a ``tuple`` to better convey that it should be +- `#6008 `__: ``Config.InvocationParams.args`` is now always a ``tuple`` to better convey that it should be immutable and avoid accidental modifications. -- `#6023 `_: ``pytest.main`` returns a ``pytest.ExitCode`` instance now, except for when custom exit codes are used (where it returns ``int`` then still). +- `#6023 `__: ``pytest.main`` returns a ``pytest.ExitCode`` instance now, except for when custom exit codes are used (where it returns ``int`` then still). -- `#6026 `_: Align prefixes in output of pytester's ``LineMatcher``. +- `#6026 `__: Align prefixes in output of pytester's ``LineMatcher``. -- `#6059 `_: Collection errors are reported as errors (and not failures like before) in the terminal's short test summary. +- `#6059 `__: Collection errors are reported as errors (and not failures like before) in the terminal's short test summary. -- `#6069 `_: ``pytester.spawn`` does not skip/xfail tests on FreeBSD anymore unconditionally. +- `#6069 `__: ``pytester.spawn`` does not skip/xfail tests on FreeBSD anymore unconditionally. -- `#6097 `_: The "[...%]" indicator in the test summary is now colored according to the final (new) multi-colored line's main color. +- `#6097 `__: The "[...%]" indicator in the test summary is now colored according to the final (new) multi-colored line's main color. -- `#6116 `_: Added ``--co`` as a synonym to ``--collect-only``. +- `#6116 `__: Added ``--co`` as a synonym to ``--collect-only``. -- `#6148 `_: ``atomicwrites`` is now only used on Windows, fixing a performance regression with assertion rewriting on Unix. +- `#6148 `__: ``atomicwrites`` is now only used on Windows, fixing a performance regression with assertion rewriting on Unix. -- `#6152 `_: Now parametrization will use the ``__name__`` attribute of any object for the id, if present. Previously it would only use ``__name__`` for functions and classes. +- `#6152 `__: Now parametrization will use the ``__name__`` attribute of any object for the id, if present. Previously it would only use ``__name__`` for functions and classes. -- `#6176 `_: Improved failure reporting with pytester's ``Hookrecorder.assertoutcome``. +- `#6176 `__: Improved failure reporting with pytester's ``Hookrecorder.assertoutcome``. -- `#6181 `_: The reason for a stopped session, e.g. with ``--maxfail`` / ``-x``, now gets reported in the test summary. +- `#6181 `__: The reason for a stopped session, e.g. with ``--maxfail`` / ``-x``, now gets reported in the test summary. -- `#6206 `_: Improved ``cache.set`` robustness and performance. +- `#6206 `__: Improved ``cache.set`` robustness and performance. Bug Fixes --------- -- `#2049 `_: Fixed ``--setup-plan`` showing inaccurate information about fixture lifetimes. +- `#2049 `__: Fixed ``--setup-plan`` showing inaccurate information about fixture lifetimes. -- `#2548 `_: Fixed line offset mismatch of skipped tests in terminal summary. +- `#2548 `__: Fixed line offset mismatch of skipped tests in terminal summary. -- `#6039 `_: The ``PytestDoctestRunner`` is now properly invalidated when unconfiguring the doctest plugin. +- `#6039 `__: The ``PytestDoctestRunner`` is now properly invalidated when unconfiguring the doctest plugin. This is important when used with ``pytester``'s ``runpytest_inprocess``. -- `#6047 `_: BaseExceptions are now handled in ``saferepr``, which includes ``pytest.fail.Exception`` etc. +- `#6047 `__: BaseExceptions are now handled in ``saferepr``, which includes ``pytest.fail.Exception`` etc. -- `#6074 `_: pytester: fixed order of arguments in ``rm_rf`` warning when cleaning up temporary directories, and do not emit warnings for errors with ``os.open``. +- `#6074 `__: pytester: fixed order of arguments in ``rm_rf`` warning when cleaning up temporary directories, and do not emit warnings for errors with ``os.open``. -- `#6189 `_: Fixed result of ``getmodpath`` method. +- `#6189 `__: Fixed result of ``getmodpath`` method. Trivial/Internal Changes ------------------------ -- `#4901 `_: ``RunResult`` from ``pytester`` now displays the mnemonic of the ``ret`` attribute when it is a +- `#4901 `__: ``RunResult`` from ``pytester`` now displays the mnemonic of the ``ret`` attribute when it is a valid ``pytest.ExitCode`` value. @@ -352,10 +352,10 @@ pytest 5.2.4 (2019-11-15) Bug Fixes --------- -- `#6194 `_: Fix incorrect discovery of non-test ``__init__.py`` files. +- `#6194 `__: Fix incorrect discovery of non-test ``__init__.py`` files. -- `#6197 `_: Revert "The first test in a package (``__init__.py``) marked with ``@pytest.mark.skip`` is now correctly skipped.". +- `#6197 `__: Revert "The first test in a package (``__init__.py``) marked with ``@pytest.mark.skip`` is now correctly skipped.". pytest 5.2.3 (2019-11-14) @@ -364,13 +364,13 @@ pytest 5.2.3 (2019-11-14) Bug Fixes --------- -- `#5830 `_: The first test in a package (``__init__.py``) marked with ``@pytest.mark.skip`` is now correctly skipped. +- `#5830 `__: The first test in a package (``__init__.py``) marked with ``@pytest.mark.skip`` is now correctly skipped. -- `#6099 `_: Fix ``--trace`` when used with parametrized functions. +- `#6099 `__: Fix ``--trace`` when used with parametrized functions. -- `#6183 `_: Using ``request`` as a parameter name in ``@pytest.mark.parametrize`` now produces a more +- `#6183 `__: Using ``request`` as a parameter name in ``@pytest.mark.parametrize`` now produces a more user-friendly error. @@ -380,16 +380,16 @@ pytest 5.2.2 (2019-10-24) Bug Fixes --------- -- `#5206 `_: Fix ``--nf`` to not forget about known nodeids with partial test selection. +- `#5206 `__: Fix ``--nf`` to not forget about known nodeids with partial test selection. -- `#5906 `_: Fix crash with ``KeyboardInterrupt`` during ``--setup-show``. +- `#5906 `__: Fix crash with ``KeyboardInterrupt`` during ``--setup-show``. -- `#5946 `_: Fixed issue when parametrizing fixtures with numpy arrays (and possibly other sequence-like types). +- `#5946 `__: Fixed issue when parametrizing fixtures with numpy arrays (and possibly other sequence-like types). -- `#6044 `_: Properly ignore ``FileNotFoundError`` exceptions when trying to remove old temporary directories, +- `#6044 `__: Properly ignore ``FileNotFoundError`` exceptions when trying to remove old temporary directories, for instance when multiple processes try to remove the same directory (common with ``pytest-xdist`` for example). @@ -400,7 +400,7 @@ pytest 5.2.1 (2019-10-06) Bug Fixes --------- -- `#5902 `_: Fix warnings about deprecated ``cmp`` attribute in ``attrs>=19.2``. +- `#5902 `__: Fix warnings about deprecated ``cmp`` attribute in ``attrs>=19.2``. pytest 5.2.0 (2019-09-28) @@ -409,7 +409,7 @@ pytest 5.2.0 (2019-09-28) Deprecations ------------ -- `#1682 `_: Passing arguments to pytest.fixture() as positional arguments is deprecated - pass them +- `#1682 `__: Passing arguments to pytest.fixture() as positional arguments is deprecated - pass them as a keyword argument instead. @@ -417,29 +417,29 @@ Deprecations Features -------- -- `#1682 `_: The ``scope`` parameter of ``@pytest.fixture`` can now be a callable that receives +- `#1682 `__: The ``scope`` parameter of ``@pytest.fixture`` can now be a callable that receives the fixture name and the ``config`` object as keyword-only parameters. See `the docs `__ for more information. -- `#5764 `_: New behavior of the ``--pastebin`` option: failures to connect to the pastebin server are reported, without failing the pytest run +- `#5764 `__: New behavior of the ``--pastebin`` option: failures to connect to the pastebin server are reported, without failing the pytest run Bug Fixes --------- -- `#5806 `_: Fix "lexer" being used when uploading to bpaste.net from ``--pastebin`` to "text". +- `#5806 `__: Fix "lexer" being used when uploading to bpaste.net from ``--pastebin`` to "text". -- `#5884 `_: Fix ``--setup-only`` and ``--setup-show`` for custom pytest items. +- `#5884 `__: Fix ``--setup-only`` and ``--setup-show`` for custom pytest items. Trivial/Internal Changes ------------------------ -- `#5056 `_: The HelpFormatter uses ``py.io.get_terminal_width`` for better width detection. +- `#5056 `__: The HelpFormatter uses ``py.io.get_terminal_width`` for better width detection. pytest 5.1.3 (2019-09-18) @@ -448,13 +448,13 @@ pytest 5.1.3 (2019-09-18) Bug Fixes --------- -- `#5807 `_: Fix pypy3.6 (nightly) on windows. +- `#5807 `__: Fix pypy3.6 (nightly) on windows. -- `#5811 `_: Handle ``--fulltrace`` correctly with ``pytest.raises``. +- `#5811 `__: Handle ``--fulltrace`` correctly with ``pytest.raises``. -- `#5819 `_: Windows: Fix regression with conftest whose qualified name contains uppercase +- `#5819 `__: Windows: Fix regression with conftest whose qualified name contains uppercase characters (introduced by #5792). @@ -464,22 +464,22 @@ pytest 5.1.2 (2019-08-30) Bug Fixes --------- -- `#2270 `_: Fixed ``self`` reference in function-scoped fixtures defined plugin classes: previously ``self`` +- `#2270 `__: Fixed ``self`` reference in function-scoped fixtures defined plugin classes: previously ``self`` would be a reference to a *test* class, not the *plugin* class. -- `#570 `_: Fixed long standing issue where fixture scope was not respected when indirect fixtures were used during +- `#570 `__: Fixed long standing issue where fixture scope was not respected when indirect fixtures were used during parametrization. -- `#5782 `_: Fix decoding error when printing an error response from ``--pastebin``. +- `#5782 `__: Fix decoding error when printing an error response from ``--pastebin``. -- `#5786 `_: Chained exceptions in test and collection reports are now correctly serialized, allowing plugins like +- `#5786 `__: Chained exceptions in test and collection reports are now correctly serialized, allowing plugins like ``pytest-xdist`` to display them properly. -- `#5792 `_: Windows: Fix error that occurs in certain circumstances when loading +- `#5792 `__: Windows: Fix error that occurs in certain circumstances when loading ``conftest.py`` from a working directory that has casing other than the one stored in the filesystem (e.g., ``c:\test`` instead of ``C:\test``). @@ -490,7 +490,7 @@ pytest 5.1.1 (2019-08-20) Bug Fixes --------- -- `#5751 `_: Fixed ``TypeError`` when importing pytest on Python 3.5.0 and 3.5.1. +- `#5751 `__: Fixed ``TypeError`` when importing pytest on Python 3.5.0 and 3.5.1. pytest 5.1.0 (2019-08-15) @@ -499,7 +499,7 @@ pytest 5.1.0 (2019-08-15) Removals -------- -- `#5180 `_: As per our policy, the following features have been deprecated in the 4.X series and are now +- `#5180 `__: As per our policy, the following features have been deprecated in the 4.X series and are now removed: * ``Request.getfuncargvalue``: use ``Request.getfixturevalue`` instead. @@ -527,7 +527,7 @@ Removals `Deprecations and Removals `__ in the docs. -- `#5565 `_: Removed unused support code for `unittest2 `__. +- `#5565 `__: Removed unused support code for `unittest2 `__. The ``unittest2`` backport module is no longer necessary since Python 3.3+, and the small amount of code in pytest to support it also doesn't seem @@ -542,7 +542,7 @@ Removals `file an issue `__. -- `#5615 `_: ``pytest.fail``, ``pytest.xfail`` and ``pytest.skip`` no longer support bytes for the message argument. +- `#5615 `__: ``pytest.fail``, ``pytest.xfail`` and ``pytest.skip`` no longer support bytes for the message argument. This was supported for Python 2 where it was tempting to use ``"message"`` instead of ``u"message"``. @@ -555,10 +555,10 @@ Removals Features -------- -- `#5564 `_: New ``Config.invocation_args`` attribute containing the unchanged arguments passed to ``pytest.main()``. +- `#5564 `__: New ``Config.invocation_args`` attribute containing the unchanged arguments passed to ``pytest.main()``. -- `#5576 `_: New `NUMBER `__ +- `#5576 `__: New `NUMBER `__ option for doctests to ignore irrelevant differences in floating-point numbers. Inspired by Sébastien Boisgérault's `numtest `__ extension for doctest. @@ -568,10 +568,10 @@ Features Improvements ------------ -- `#5471 `_: JUnit XML now includes a timestamp and hostname in the testsuite tag. +- `#5471 `__: JUnit XML now includes a timestamp and hostname in the testsuite tag. -- `#5707 `_: Time taken to run the test suite now includes a human-readable representation when it takes over +- `#5707 `__: Time taken to run the test suite now includes a human-readable representation when it takes over 60 seconds, for example:: ===== 2 failed in 102.70s (0:01:42) ===== @@ -581,71 +581,71 @@ Improvements Bug Fixes --------- -- `#4344 `_: Fix RuntimeError/StopIteration when trying to collect package with "__init__.py" only. +- `#4344 `__: Fix RuntimeError/StopIteration when trying to collect package with "__init__.py" only. -- `#5115 `_: Warnings issued during ``pytest_configure`` are explicitly not treated as errors, even if configured as such, because it otherwise completely breaks pytest. +- `#5115 `__: Warnings issued during ``pytest_configure`` are explicitly not treated as errors, even if configured as such, because it otherwise completely breaks pytest. -- `#5477 `_: The XML file produced by ``--junitxml`` now correctly contain a ```` root element. +- `#5477 `__: The XML file produced by ``--junitxml`` now correctly contain a ```` root element. -- `#5524 `_: Fix issue where ``tmp_path`` and ``tmpdir`` would not remove directories containing files marked as read-only, +- `#5524 `__: Fix issue where ``tmp_path`` and ``tmpdir`` would not remove directories containing files marked as read-only, which could lead to pytest crashing when executed a second time with the ``--basetemp`` option. -- `#5537 `_: Replace ``importlib_metadata`` backport with ``importlib.metadata`` from the +- `#5537 `__: Replace ``importlib_metadata`` backport with ``importlib.metadata`` from the standard library on Python 3.8+. -- `#5578 `_: Improve type checking for some exception-raising functions (``pytest.xfail``, ``pytest.skip``, etc) +- `#5578 `__: Improve type checking for some exception-raising functions (``pytest.xfail``, ``pytest.skip``, etc) so they provide better error messages when users meant to use marks (for example ``@pytest.xfail`` instead of ``@pytest.mark.xfail``). -- `#5606 `_: Fixed internal error when test functions were patched with objects that cannot be compared +- `#5606 `__: Fixed internal error when test functions were patched with objects that cannot be compared for truth values against others, like ``numpy`` arrays. -- `#5634 `_: ``pytest.exit`` is now correctly handled in ``unittest`` cases. +- `#5634 `__: ``pytest.exit`` is now correctly handled in ``unittest`` cases. This makes ``unittest`` cases handle ``quit`` from pytest's pdb correctly. -- `#5650 `_: Improved output when parsing an ini configuration file fails. +- `#5650 `__: Improved output when parsing an ini configuration file fails. -- `#5701 `_: Fix collection of ``staticmethod`` objects defined with ``functools.partial``. +- `#5701 `__: Fix collection of ``staticmethod`` objects defined with ``functools.partial``. -- `#5734 `_: Skip async generator test functions, and update the warning message to refer to ``async def`` functions. +- `#5734 `__: Skip async generator test functions, and update the warning message to refer to ``async def`` functions. Improved Documentation ---------------------- -- `#5669 `_: Add docstring for ``Testdir.copy_example``. +- `#5669 `__: Add docstring for ``Testdir.copy_example``. Trivial/Internal Changes ------------------------ -- `#5095 `_: XML files of the ``xunit2`` family are now validated against the schema by pytest's own test suite +- `#5095 `__: XML files of the ``xunit2`` family are now validated against the schema by pytest's own test suite to avoid future regressions. -- `#5516 `_: Cache node splitting function which can improve collection performance in very large test suites. +- `#5516 `__: Cache node splitting function which can improve collection performance in very large test suites. -- `#5603 `_: Simplified internal ``SafeRepr`` class and removed some dead code. +- `#5603 `__: Simplified internal ``SafeRepr`` class and removed some dead code. -- `#5664 `_: When invoking pytest's own testsuite with ``PYTHONDONTWRITEBYTECODE=1``, +- `#5664 `__: When invoking pytest's own testsuite with ``PYTHONDONTWRITEBYTECODE=1``, the ``test_xfail_handling`` test no longer fails. -- `#5684 `_: Replace manual handling of ``OSError.errno`` in the codebase by new ``OSError`` subclasses (``PermissionError``, ``FileNotFoundError``, etc.). +- `#5684 `__: Replace manual handling of ``OSError.errno`` in the codebase by new ``OSError`` subclasses (``PermissionError``, ``FileNotFoundError``, etc.). pytest 5.0.1 (2019-07-04) @@ -654,20 +654,20 @@ pytest 5.0.1 (2019-07-04) Bug Fixes --------- -- `#5479 `_: Improve quoting in ``raises`` match failure message. +- `#5479 `__: Improve quoting in ``raises`` match failure message. -- `#5523 `_: Fixed using multiple short options together in the command-line (for example ``-vs``) in Python 3.8+. +- `#5523 `__: Fixed using multiple short options together in the command-line (for example ``-vs``) in Python 3.8+. -- `#5547 `_: ``--step-wise`` now handles ``xfail(strict=True)`` markers properly. +- `#5547 `__: ``--step-wise`` now handles ``xfail(strict=True)`` markers properly. Improved Documentation ---------------------- -- `#5517 `_: Improve "Declaring new hooks" section in chapter "Writing Plugins" +- `#5517 `__: Improve "Declaring new hooks" section in chapter "Writing Plugins" pytest 5.0.0 (2019-06-28) @@ -683,7 +683,7 @@ For more details, see our `Python 2.7 and 3.4 support plan `_: Pytest no longer accepts prefixes of command-line arguments, for example +- `#1149 `__: Pytest no longer accepts prefixes of command-line arguments, for example typing ``pytest --doctest-mod`` inplace of ``--doctest-modules``. This was previously allowed where the ``ArgumentParser`` thought it was unambiguous, but this could be incorrect due to delayed parsing of options for plugins. @@ -692,7 +692,7 @@ Removals `#4009 `__. -- `#5402 `_: **PytestDeprecationWarning are now errors by default.** +- `#5402 `__: **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 @@ -717,7 +717,7 @@ Removals comment to `#5402 `__. -- `#5412 `_: ``ExceptionInfo`` objects (returned by ``pytest.raises``) now have the same ``str`` representation as ``repr``, which +- `#5412 `__: ``ExceptionInfo`` objects (returned by ``pytest.raises``) now have the same ``str`` representation as ``repr``, which avoids some confusion when users use ``print(e)`` to inspect the object. This means code like: @@ -743,11 +743,11 @@ Removals Deprecations ------------ -- `#4488 `_: The removal of the ``--result-log`` option and module has been postponed to (tentatively) pytest 6.0 as +- `#4488 `__: The removal of the ``--result-log`` option and module has been postponed to (tentatively) pytest 6.0 as the team has not yet got around to implement a good alternative for it. -- `#466 `_: The ``funcargnames`` attribute has been an alias for ``fixturenames`` since +- `#466 `__: The ``funcargnames`` attribute has been an alias for ``fixturenames`` since pytest 2.3, and is now deprecated in code too. @@ -755,13 +755,13 @@ Deprecations Features -------- -- `#3457 `_: New `pytest_assertion_pass `__ +- `#3457 `__: New `pytest_assertion_pass `__ hook, called with context information when an assertion *passes*. This hook is still **experimental** so use it with caution. -- `#5440 `_: The `faulthandler `__ standard library +- `#5440 `__: The `faulthandler `__ standard library module is now enabled by default to help users diagnose crashes in C modules. This functionality was provided by integrating the external @@ -771,10 +771,10 @@ Features For more information see the docs: https://docs.pytest.org/en/latest/usage.html#fault-handler -- `#5452 `_: When warnings are configured as errors, pytest warnings now appear as originating from ``pytest.`` instead of the internal ``_pytest.warning_types.`` module. +- `#5452 `__: When warnings are configured as errors, pytest warnings now appear as originating from ``pytest.`` instead of the internal ``_pytest.warning_types.`` module. -- `#5125 `_: ``Session.exitcode`` values are now coded in ``pytest.ExitCode``, an ``IntEnum``. This makes the exit code available for consumer code and are more explicit other than just documentation. User defined exit codes are still valid, but should be used with caution. +- `#5125 `__: ``Session.exitcode`` values are now coded in ``pytest.ExitCode``, an ``IntEnum``. This makes the exit code available for consumer code and are more explicit other than just documentation. User defined exit codes are still valid, but should be used with caution. The team doesn't expect this change to break test suites or plugins in general, except in esoteric/specific scenarios. @@ -785,20 +785,20 @@ Features Bug Fixes --------- -- `#1403 `_: Switch from ``imp`` to ``importlib``. +- `#1403 `__: Switch from ``imp`` to ``importlib``. -- `#1671 `_: The name of the ``.pyc`` files cached by the assertion writer now includes the pytest version +- `#1671 `__: The name of the ``.pyc`` files cached by the assertion writer now includes the pytest version to avoid stale caches. -- `#2761 `_: Honor PEP 235 on case-insensitive file systems. +- `#2761 `__: Honor PEP 235 on case-insensitive file systems. -- `#5078 `_: Test module is no longer double-imported when using ``--pyargs``. +- `#5078 `__: Test module is no longer double-imported when using ``--pyargs``. -- `#5260 `_: Improved comparison of byte strings. +- `#5260 `__: Improved comparison of byte strings. When comparing bytes, the assertion message used to show the byte numeric value when showing the differences:: @@ -817,60 +817,60 @@ Bug Fixes E Use -v to get the full diff -- `#5335 `_: Colorize level names when the level in the logging format is formatted using +- `#5335 `__: Colorize level names when the level in the logging format is formatted using '%(levelname).Xs' (truncated fixed width alignment), where X is an integer. -- `#5354 `_: Fix ``pytest.mark.parametrize`` when the argvalues is an iterator. +- `#5354 `__: Fix ``pytest.mark.parametrize`` when the argvalues is an iterator. -- `#5370 `_: Revert unrolling of ``all()`` to fix ``NameError`` on nested comprehensions. +- `#5370 `__: Revert unrolling of ``all()`` to fix ``NameError`` on nested comprehensions. -- `#5371 `_: Revert unrolling of ``all()`` to fix incorrect handling of generators with ``if``. +- `#5371 `__: Revert unrolling of ``all()`` to fix incorrect handling of generators with ``if``. -- `#5372 `_: Revert unrolling of ``all()`` to fix incorrect assertion when using ``all()`` in an expression. +- `#5372 `__: Revert unrolling of ``all()`` to fix incorrect assertion when using ``all()`` in an expression. -- `#5383 `_: ``-q`` has again an impact on the style of the collected items +- `#5383 `__: ``-q`` has again an impact on the style of the collected items (``--collect-only``) when ``--log-cli-level`` is used. -- `#5389 `_: Fix regressions of `#5063 `__ for ``importlib_metadata.PathDistribution`` which have their ``files`` attribute being ``None``. +- `#5389 `__: Fix regressions of `#5063 `__ for ``importlib_metadata.PathDistribution`` which have their ``files`` attribute being ``None``. -- `#5390 `_: Fix regression where the ``obj`` attribute of ``TestCase`` items was no longer bound to methods. +- `#5390 `__: Fix regression where the ``obj`` attribute of ``TestCase`` items was no longer bound to methods. -- `#5404 `_: Emit a warning when attempting to unwrap a broken object raises an exception, +- `#5404 `__: Emit a warning when attempting to unwrap a broken object raises an exception, for easier debugging (`#5080 `__). -- `#5432 `_: Prevent "already imported" warnings from assertion rewriter when invoking pytest in-process multiple times. +- `#5432 `__: Prevent "already imported" warnings from assertion rewriter when invoking pytest in-process multiple times. -- `#5433 `_: Fix assertion rewriting in packages (``__init__.py``). +- `#5433 `__: Fix assertion rewriting in packages (``__init__.py``). -- `#5444 `_: Fix ``--stepwise`` mode when the first file passed on the command-line fails to collect. +- `#5444 `__: Fix ``--stepwise`` mode when the first file passed on the command-line fails to collect. -- `#5482 `_: Fix bug introduced in 4.6.0 causing collection errors when passing +- `#5482 `__: Fix bug introduced in 4.6.0 causing collection errors when passing more than 2 positional arguments to ``pytest.mark.parametrize``. -- `#5505 `_: Fix crash when discovery fails while using ``-p no:terminal``. +- `#5505 `__: Fix crash when discovery fails while using ``-p no:terminal``. Improved Documentation ---------------------- -- `#5315 `_: Expand docs on mocking classes and dictionaries with ``monkeypatch``. +- `#5315 `__: Expand docs on mocking classes and dictionaries with ``monkeypatch``. -- `#5416 `_: Fix PytestUnknownMarkWarning in run/skip example. +- `#5416 `__: Fix PytestUnknownMarkWarning in run/skip example. pytest 4.6.9 (2020-01-04) @@ -879,7 +879,7 @@ pytest 4.6.9 (2020-01-04) Bug Fixes --------- -- `#6301 `_: Fix assertion rewriting for egg-based distributions and ``editable`` installs (``pip install --editable``). +- `#6301 `__: Fix assertion rewriting for egg-based distributions and ``editable`` installs (``pip install --editable``). pytest 4.6.8 (2019-12-19) @@ -888,21 +888,21 @@ pytest 4.6.8 (2019-12-19) Features -------- -- `#5471 `_: JUnit XML now includes a timestamp and hostname in the testsuite tag. +- `#5471 `__: JUnit XML now includes a timestamp and hostname in the testsuite tag. Bug Fixes --------- -- `#5430 `_: junitxml: Logs for failed test are now passed to junit report in case the test fails during call phase. +- `#5430 `__: junitxml: Logs for failed test are now passed to junit report in case the test fails during call phase. Trivial/Internal Changes ------------------------ -- `#6345 `_: Pin ``colorama`` to ``0.4.1`` only for Python 3.4 so newer Python versions can still receive colorama updates. +- `#6345 `__: Pin ``colorama`` to ``0.4.1`` only for Python 3.4 so newer Python versions can still receive colorama updates. pytest 4.6.7 (2019-12-05) @@ -911,10 +911,10 @@ pytest 4.6.7 (2019-12-05) Bug Fixes --------- -- `#5477 `_: The XML file produced by ``--junitxml`` now correctly contain a ```` root element. +- `#5477 `__: The XML file produced by ``--junitxml`` now correctly contain a ```` root element. -- `#6044 `_: Properly ignore ``FileNotFoundError`` (``OSError.errno == NOENT`` in Python 2) exceptions when trying to remove old temporary directories, +- `#6044 `__: Properly ignore ``FileNotFoundError`` (``OSError.errno == NOENT`` in Python 2) exceptions when trying to remove old temporary directories, for instance when multiple processes try to remove the same directory (common with ``pytest-xdist`` for example). @@ -925,24 +925,24 @@ pytest 4.6.6 (2019-10-11) Bug Fixes --------- -- `#5523 `_: Fixed using multiple short options together in the command-line (for example ``-vs``) in Python 3.8+. +- `#5523 `__: Fixed using multiple short options together in the command-line (for example ``-vs``) in Python 3.8+. -- `#5537 `_: Replace ``importlib_metadata`` backport with ``importlib.metadata`` from the +- `#5537 `__: Replace ``importlib_metadata`` backport with ``importlib.metadata`` from the standard library on Python 3.8+. -- `#5806 `_: Fix "lexer" being used when uploading to bpaste.net from ``--pastebin`` to "text". +- `#5806 `__: Fix "lexer" being used when uploading to bpaste.net from ``--pastebin`` to "text". -- `#5902 `_: Fix warnings about deprecated ``cmp`` attribute in ``attrs>=19.2``. +- `#5902 `__: Fix warnings about deprecated ``cmp`` attribute in ``attrs>=19.2``. Trivial/Internal Changes ------------------------ -- `#5801 `_: Fixes python version checks (detected by ``flake8-2020``) in case python4 becomes a thing. +- `#5801 `__: Fixes python version checks (detected by ``flake8-2020``) in case python4 becomes a thing. pytest 4.6.5 (2019-08-05) @@ -951,20 +951,20 @@ pytest 4.6.5 (2019-08-05) Bug Fixes --------- -- `#4344 `_: Fix RuntimeError/StopIteration when trying to collect package with "__init__.py" only. +- `#4344 `__: Fix RuntimeError/StopIteration when trying to collect package with "__init__.py" only. -- `#5478 `_: Fix encode error when using unicode strings in exceptions with ``pytest.raises``. +- `#5478 `__: Fix encode error when using unicode strings in exceptions with ``pytest.raises``. -- `#5524 `_: Fix issue where ``tmp_path`` and ``tmpdir`` would not remove directories containing files marked as read-only, +- `#5524 `__: Fix issue where ``tmp_path`` and ``tmpdir`` would not remove directories containing files marked as read-only, which could lead to pytest crashing when executed a second time with the ``--basetemp`` option. -- `#5547 `_: ``--step-wise`` now handles ``xfail(strict=True)`` markers properly. +- `#5547 `__: ``--step-wise`` now handles ``xfail(strict=True)`` markers properly. -- `#5650 `_: Improved output when parsing an ini configuration file fails. +- `#5650 `__: Improved output when parsing an ini configuration file fails. pytest 4.6.4 (2019-06-28) ========================= @@ -972,18 +972,18 @@ pytest 4.6.4 (2019-06-28) Bug Fixes --------- -- `#5404 `_: Emit a warning when attempting to unwrap a broken object raises an exception, +- `#5404 `__: Emit a warning when attempting to unwrap a broken object raises an exception, for easier debugging (`#5080 `__). -- `#5444 `_: Fix ``--stepwise`` mode when the first file passed on the command-line fails to collect. +- `#5444 `__: Fix ``--stepwise`` mode when the first file passed on the command-line fails to collect. -- `#5482 `_: Fix bug introduced in 4.6.0 causing collection errors when passing +- `#5482 `__: Fix bug introduced in 4.6.0 causing collection errors when passing more than 2 positional arguments to ``pytest.mark.parametrize``. -- `#5505 `_: Fix crash when discovery fails while using ``-p no:terminal``. +- `#5505 `__: Fix crash when discovery fails while using ``-p no:terminal``. pytest 4.6.3 (2019-06-11) @@ -992,14 +992,14 @@ pytest 4.6.3 (2019-06-11) Bug Fixes --------- -- `#5383 `_: ``-q`` has again an impact on the style of the collected items +- `#5383 `__: ``-q`` has again an impact on the style of the collected items (``--collect-only``) when ``--log-cli-level`` is used. -- `#5389 `_: Fix regressions of `#5063 `__ for ``importlib_metadata.PathDistribution`` which have their ``files`` attribute being ``None``. +- `#5389 `__: Fix regressions of `#5063 `__ for ``importlib_metadata.PathDistribution`` which have their ``files`` attribute being ``None``. -- `#5390 `_: Fix regression where the ``obj`` attribute of ``TestCase`` items was no longer bound to methods. +- `#5390 `__: Fix regression where the ``obj`` attribute of ``TestCase`` items was no longer bound to methods. pytest 4.6.2 (2019-06-03) @@ -1008,13 +1008,13 @@ pytest 4.6.2 (2019-06-03) Bug Fixes --------- -- `#5370 `_: Revert unrolling of ``all()`` to fix ``NameError`` on nested comprehensions. +- `#5370 `__: Revert unrolling of ``all()`` to fix ``NameError`` on nested comprehensions. -- `#5371 `_: Revert unrolling of ``all()`` to fix incorrect handling of generators with ``if``. +- `#5371 `__: Revert unrolling of ``all()`` to fix incorrect handling of generators with ``if``. -- `#5372 `_: Revert unrolling of ``all()`` to fix incorrect assertion when using ``all()`` in an expression. +- `#5372 `__: Revert unrolling of ``all()`` to fix incorrect assertion when using ``all()`` in an expression. pytest 4.6.1 (2019-06-02) @@ -1023,10 +1023,10 @@ pytest 4.6.1 (2019-06-02) Bug Fixes --------- -- `#5354 `_: Fix ``pytest.mark.parametrize`` when the argvalues is an iterator. +- `#5354 `__: Fix ``pytest.mark.parametrize`` when the argvalues is an iterator. -- `#5358 `_: Fix assertion rewriting of ``all()`` calls to deal with non-generators. +- `#5358 `__: Fix assertion rewriting of ``all()`` calls to deal with non-generators. pytest 4.6.0 (2019-05-31) @@ -1043,68 +1043,68 @@ For more details, see our `Python 2.7 and 3.4 support plan `_: Added the ``junit_log_passing_tests`` ini value which can be used to enable or disable logging of passing test output in the Junit XML file. +- `#4559 `__: Added the ``junit_log_passing_tests`` ini value which can be used to enable or disable logging of passing test output in the Junit XML file. -- `#4956 `_: pytester's ``testdir.spawn`` uses ``tmpdir`` as HOME/USERPROFILE directory. +- `#4956 `__: pytester's ``testdir.spawn`` uses ``tmpdir`` as HOME/USERPROFILE directory. -- `#5062 `_: Unroll calls to ``all`` to full for-loops with assertion rewriting for better failure messages, especially when using Generator Expressions. +- `#5062 `__: Unroll calls to ``all`` to full for-loops with assertion rewriting for better failure messages, especially when using Generator Expressions. -- `#5063 `_: Switch from ``pkg_resources`` to ``importlib-metadata`` for entrypoint detection for improved performance and import time. +- `#5063 `__: Switch from ``pkg_resources`` to ``importlib-metadata`` for entrypoint detection for improved performance and import time. -- `#5091 `_: The output for ini options in ``--help`` has been improved. +- `#5091 `__: The output for ini options in ``--help`` has been improved. -- `#5269 `_: ``pytest.importorskip`` includes the ``ImportError`` now in the default ``reason``. +- `#5269 `__: ``pytest.importorskip`` includes the ``ImportError`` now in the default ``reason``. -- `#5311 `_: Captured logs that are output for each failing test are formatted using the +- `#5311 `__: Captured logs that are output for each failing test are formatted using the ColoredLevelFormatter. -- `#5312 `_: Improved formatting of multiline log messages in Python 3. +- `#5312 `__: Improved formatting of multiline log messages in Python 3. Bug Fixes --------- -- `#2064 `_: The debugging plugin imports the wrapped ``Pdb`` class (``--pdbcls``) on-demand now. +- `#2064 `__: The debugging plugin imports the wrapped ``Pdb`` class (``--pdbcls``) on-demand now. -- `#4908 `_: The ``pytest_enter_pdb`` hook gets called with post-mortem (``--pdb``). +- `#4908 `__: The ``pytest_enter_pdb`` hook gets called with post-mortem (``--pdb``). -- `#5036 `_: Fix issue where fixtures dependent on other parametrized fixtures would be erroneously parametrized. +- `#5036 `__: Fix issue where fixtures dependent on other parametrized fixtures would be erroneously parametrized. -- `#5256 `_: Handle internal error due to a lone surrogate unicode character not being representable in Jython. +- `#5256 `__: Handle internal error due to a lone surrogate unicode character not being representable in Jython. -- `#5257 `_: Ensure that ``sys.stdout.mode`` does not include ``'b'`` as it is a text stream. +- `#5257 `__: Ensure that ``sys.stdout.mode`` does not include ``'b'`` as it is a text stream. -- `#5278 `_: Pytest's internal python plugin can be disabled using ``-p no:python`` again. +- `#5278 `__: Pytest's internal python plugin can be disabled using ``-p no:python`` again. -- `#5286 `_: Fix issue with ``disable_test_id_escaping_and_forfeit_all_rights_to_community_support`` option not working when using a list of test IDs in parametrized tests. +- `#5286 `__: Fix issue with ``disable_test_id_escaping_and_forfeit_all_rights_to_community_support`` option not working when using a list of test IDs in parametrized tests. -- `#5330 `_: Show the test module being collected when emitting ``PytestCollectionWarning`` messages for +- `#5330 `__: Show the test module being collected when emitting ``PytestCollectionWarning`` messages for test classes with ``__init__`` and ``__new__`` methods to make it easier to pin down the problem. -- `#5333 `_: Fix regression in 4.5.0 with ``--lf`` not re-running all tests with known failures from non-selected tests. +- `#5333 `__: Fix regression in 4.5.0 with ``--lf`` not re-running all tests with known failures from non-selected tests. Improved Documentation ---------------------- -- `#5250 `_: Expand docs on use of ``setenv`` and ``delenv`` with ``monkeypatch``. +- `#5250 `__: Expand docs on use of ``setenv`` and ``delenv`` with ``monkeypatch``. Archive