You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.rst
+158Lines changed: 158 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,164 @@ with advance notice in the **Deprecations** section of releases.
18
18
19
19
.. towncrier release notes start
20
20
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
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.
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``).
0 commit comments