Skip to content

Commit 8907fed

Browse files
committed
Merge master into features (with regen branch)
2 parents 1410d3d + befc8a3 commit 8907fed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+333
-188
lines changed

CHANGELOG.rst

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,164 @@ with advance notice in the **Deprecations** section of releases.
1818
1919
.. towncrier release notes start
2020
21+
pytest 4.4.0 (2019-03-29)
22+
=========================
23+
24+
Features
25+
--------
26+
27+
- `#2224 <https://github.com/pytest-dev/pytest/issues/2224>`_: ``async`` test functions are skipped and a warning is emitted when a suitable
28+
async plugin is not installed (such as ``pytest-asyncio`` or ``pytest-trio``).
29+
30+
Previously ``async`` functions would not execute at all but still be marked as "passed".
31+
32+
33+
- `#2482 <https://github.com/pytest-dev/pytest/issues/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.
34+
35+
36+
- `#4718 <https://github.com/pytest-dev/pytest/issues/4718>`_: The ``-p`` option can now be used to early-load plugins also by entry-point name, instead of just
37+
by module name.
38+
39+
This makes it possible to early load external plugins like ``pytest-cov`` in the command-line::
40+
41+
pytest -p pytest_cov
42+
43+
44+
- `#4855 <https://github.com/pytest-dev/pytest/issues/4855>`_: The ``--pdbcls`` option handles classes via module attributes now (e.g.
45+
``pdb:pdb.Pdb`` with `pdb++`_), and its validation was improved.
46+
47+
.. _pdb++: https://pypi.org/project/pdbpp/
48+
49+
50+
- `#4875 <https://github.com/pytest-dev/pytest/issues/4875>`_: The `testpaths <https://docs.pytest.org/en/latest/reference.html#confval-testpaths>`__ configuration option is now displayed next
51+
to the ``rootdir`` and ``inifile`` lines in the pytest header if the option is in effect, i.e., directories or file names were
52+
not explicitly passed in the command line.
53+
54+
Also, ``inifile`` is only displayed if there's a configuration file, instead of an empty ``inifile:`` string.
55+
56+
57+
- `#4911 <https://github.com/pytest-dev/pytest/issues/4911>`_: Doctests can be skipped now dynamically using ``pytest.skip()``.
58+
59+
60+
- `#4920 <https://github.com/pytest-dev/pytest/issues/4920>`_: Internal refactorings have been made in order to make the implementation of the
61+
`pytest-subtests <https://github.com/pytest-dev/pytest-subtests>`__ plugin
62+
possible, which adds unittest sub-test support and a new ``subtests`` fixture as discussed in
63+
`#1367 <https://github.com/pytest-dev/pytest/issues/1367>`__.
64+
65+
For details on the internal refactorings, please see the details on the related PR.
66+
67+
68+
- `#4931 <https://github.com/pytest-dev/pytest/issues/4931>`_: pytester's ``LineMatcher`` asserts that the passed lines are a sequence.
69+
70+
71+
- `#4936 <https://github.com/pytest-dev/pytest/issues/4936>`_: Handle ``-p plug`` after ``-p no:plug``.
72+
73+
This can be used to override a blocked plugin (e.g. in "addopts") from the
74+
command line etc.
75+
76+
77+
- `#4951 <https://github.com/pytest-dev/pytest/issues/4951>`_: Output capturing is handled correctly when only capturing via fixtures (capsys, capfs) with ``pdb.set_trace()``.
78+
79+
80+
- `#4956 <https://github.com/pytest-dev/pytest/issues/4956>`_: ``pytester`` sets ``$HOME`` and ``$USERPROFILE`` to the temporary directory during test runs.
81+
82+
This ensures to not load configuration files from the real user's home directory.
83+
84+
85+
- `#4980 <https://github.com/pytest-dev/pytest/issues/4980>`_: Namespace packages are handled better with ``monkeypatch.syspath_prepend`` and ``testdir.syspathinsert`` (via ``pkg_resources.fixup_namespace_packages``).
86+
87+
88+
- `#4993 <https://github.com/pytest-dev/pytest/issues/4993>`_: The stepwise plugin reports status information now.
89+
90+
91+
- `#5008 <https://github.com/pytest-dev/pytest/issues/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.
92+
93+
This makes it simpler for plugins to support old pytest versions.
94+
95+
96+
97+
Bug Fixes
98+
---------
99+
100+
- `#1895 <https://github.com/pytest-dev/pytest/issues/1895>`_: Fix bug where fixtures requested dynamically via ``request.getfixturevalue()`` might be teardown
101+
before the requesting fixture.
102+
103+
104+
- `#4851 <https://github.com/pytest-dev/pytest/issues/4851>`_: pytester unsets ``PYTEST_ADDOPTS`` now to not use outer options with ``testdir.runpytest()``.
105+
106+
107+
- `#4903 <https://github.com/pytest-dev/pytest/issues/4903>`_: Use the correct modified time for years after 2038 in rewritten ``.pyc`` files.
108+
109+
110+
- `#4928 <https://github.com/pytest-dev/pytest/issues/4928>`_: Fix line offsets with ``ScopeMismatch`` errors.
111+
112+
113+
- `#4957 <https://github.com/pytest-dev/pytest/issues/4957>`_: ``-p no:plugin`` is handled correctly for default (internal) plugins now, e.g. with ``-p no:capture``.
114+
115+
Previously they were loaded (imported) always, making e.g. the ``capfd`` fixture available.
116+
117+
118+
- `#4968 <https://github.com/pytest-dev/pytest/issues/4968>`_: The pdb ``quit`` command is handled properly when used after the ``debug`` command with `pdb++`_.
119+
120+
.. _pdb++: https://pypi.org/project/pdbpp/
121+
122+
123+
- `#4975 <https://github.com/pytest-dev/pytest/issues/4975>`_: Fix the interpretation of ``-qq`` option where it was being considered as ``-v`` instead.
124+
125+
126+
- `#4978 <https://github.com/pytest-dev/pytest/issues/4978>`_: ``outcomes.Exit`` is not swallowed in ``assertrepr_compare`` anymore.
127+
128+
129+
- `#4988 <https://github.com/pytest-dev/pytest/issues/4988>`_: Close logging's file handler explicitly when the session finishes.
130+
131+
132+
- `#5003 <https://github.com/pytest-dev/pytest/issues/5003>`_: Fix line offset with mark collection error (off by one).
133+
134+
135+
136+
Improved Documentation
137+
----------------------
138+
139+
- `#4974 <https://github.com/pytest-dev/pytest/issues/4974>`_: Update docs for ``pytest_cmdline_parse`` hook to note availability liminations
140+
141+
142+
143+
Trivial/Internal Changes
144+
------------------------
145+
146+
- `#4718 <https://github.com/pytest-dev/pytest/issues/4718>`_: ``pluggy>=0.9`` is now required.
147+
148+
149+
- `#4815 <https://github.com/pytest-dev/pytest/issues/4815>`_: ``funcsigs>=1.0`` is now required for Python 2.7.
150+
151+
152+
- `#4829 <https://github.com/pytest-dev/pytest/issues/4829>`_: Some left-over internal code related to ``yield`` tests has been removed.
153+
154+
155+
- `#4890 <https://github.com/pytest-dev/pytest/issues/4890>`_: Remove internally unused ``anypython`` fixture from the pytester plugin.
156+
157+
158+
- `#4912 <https://github.com/pytest-dev/pytest/issues/4912>`_: Remove deprecated Sphinx directive, ``add_description_unit()``,
159+
pin sphinx-removed-in to >= 0.2.0 to support Sphinx 2.0.
160+
161+
162+
- `#4913 <https://github.com/pytest-dev/pytest/issues/4913>`_: Fix pytest tests invocation with custom ``PYTHONPATH``.
163+
164+
165+
- `#4965 <https://github.com/pytest-dev/pytest/issues/4965>`_: New ``pytest_report_to_serializable`` and ``pytest_report_from_serializable`` **experimental** hooks.
166+
167+
These hooks will be used by ``pytest-xdist``, ``pytest-subtests``, and the replacement for
168+
resultlog to serialize and customize reports.
169+
170+
They are experimental, meaning that their details might change or even be removed
171+
completely in future patch releases without warning.
172+
173+
Feedback is welcome from plugin authors and users alike.
174+
175+
176+
- `#4987 <https://github.com/pytest-dev/pytest/issues/4987>`_: ``Collector.repr_failure`` respects the ``--tb`` option, but only defaults to ``short`` now (with ``auto``).
177+
178+
21179
pytest 4.3.1 (2019-03-11)
22180
=========================
23181

changelog/1895.bugfix.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

changelog/2224.feature.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.

changelog/2482.feature.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/4718.feature.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.

changelog/4718.trivial.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/4815.trivial.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/4829.trivial.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/4851.bugfix.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/4855.feature.rst

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)