Skip to content

Commit 7dcd9bf

Browse files
authored
Merge pull request #4696 from nicoddemus/release-4.2.0
Release 4.2.0
2 parents b96e162 + fa979a4 commit 7dcd9bf

Some content is hidden

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

60 files changed

+745
-441
lines changed

AUTHORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ Jonas Obrist
120120
Jordan Guymon
121121
Jordan Moldow
122122
Jordan Speicher
123+
Joseph Hunkeler
123124
Joshua Bronson
124125
Jurko Gospodnetić
125126
Justyna Janczyszyn
@@ -129,6 +130,7 @@ Katerina Koukiou
129130
Kevin Cox
130131
Kodi B. Arfer
131132
Kostis Anagnostopoulos
133+
Kristoffer Nordström
132134
Kyle Altendorf
133135
Lawrence Mitchell
134136
Lee Kamentsky

CHANGELOG.rst

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,84 @@ with advance notice in the **Deprecations** section of releases.
1818
1919
.. towncrier release notes start
2020
21+
pytest 4.2.0 (2019-01-30)
22+
=========================
23+
24+
Features
25+
--------
26+
27+
- `#3094 <https://github.com/pytest-dev/pytest/issues/3094>`_: `Class xunit-style <https://docs.pytest.org/en/latest/xunit_setup.html>`__ functions and methods
28+
now obey the scope of *autouse* fixtures.
29+
30+
This fixes a number of surprising issues like ``setup_method`` being called before session-scoped
31+
autouse fixtures (see `#517 <https://github.com/pytest-dev/pytest/issues/517>`__ for an example).
32+
33+
34+
- `#4627 <https://github.com/pytest-dev/pytest/issues/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
35+
support those Python versions.
36+
37+
38+
- `#4660 <https://github.com/pytest-dev/pytest/issues/4660>`_: The number of *selected* tests now are also displayed when the ``-k`` or ``-m`` flags are used.
39+
40+
41+
- `#4688 <https://github.com/pytest-dev/pytest/issues/4688>`_: ``pytest_report_teststatus`` hook now can also receive a ``config`` parameter.
42+
43+
44+
- `#4691 <https://github.com/pytest-dev/pytest/issues/4691>`_: ``pytest_terminal_summary`` hook now can also receive a ``config`` parameter.
45+
46+
47+
48+
Bug Fixes
49+
---------
50+
51+
- `#3547 <https://github.com/pytest-dev/pytest/issues/3547>`_: ``--junitxml`` can emit XML compatible with Jenkins xUnit.
52+
``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
53+
54+
55+
- `#4280 <https://github.com/pytest-dev/pytest/issues/4280>`_: Improve quitting from pdb, especially with ``--trace``.
56+
57+
Using ``q[quit]`` after ``pdb.set_trace()`` will quit pytest also.
58+
59+
60+
- `#4402 <https://github.com/pytest-dev/pytest/issues/4402>`_: Warning summary now groups warnings by message instead of by test id.
61+
62+
This makes the output more compact and better conveys the general idea of how much code is
63+
actually generating warnings, instead of how many tests call that code.
64+
65+
66+
- `#4536 <https://github.com/pytest-dev/pytest/issues/4536>`_: ``monkeypatch.delattr`` handles class descriptors like ``staticmethod``/``classmethod``.
67+
68+
69+
- `#4649 <https://github.com/pytest-dev/pytest/issues/4649>`_: Restore marks being considered keywords for keyword expressions.
70+
71+
72+
- `#4653 <https://github.com/pytest-dev/pytest/issues/4653>`_: ``tmp_path`` fixture and other related ones provides resolved path (a.k.a real path)
73+
74+
75+
- `#4667 <https://github.com/pytest-dev/pytest/issues/4667>`_: ``pytest_terminal_summary`` uses result from ``pytest_report_teststatus`` hook, rather than hardcoded strings.
76+
77+
78+
- `#4669 <https://github.com/pytest-dev/pytest/issues/4669>`_: Correctly handle ``unittest.SkipTest`` exception containing non-ascii characters on Python 2.
79+
80+
81+
- `#4680 <https://github.com/pytest-dev/pytest/issues/4680>`_: Ensure the ``tmpdir`` and the ``tmp_path`` fixtures are the same folder.
82+
83+
84+
- `#4681 <https://github.com/pytest-dev/pytest/issues/4681>`_: Ensure ``tmp_path`` is always a real path.
85+
86+
87+
88+
Trivial/Internal Changes
89+
------------------------
90+
91+
- `#4643 <https://github.com/pytest-dev/pytest/issues/4643>`_: Use ``a.item()`` instead of the deprecated ``np.asscalar(a)`` in ``pytest.approx``.
92+
93+
``np.asscalar`` has been `deprecated <https://github.com/numpy/numpy/blob/master/doc/release/1.16.0-notes.rst#new-deprecations>`__ in ``numpy 1.16.``.
94+
95+
96+
- `#4657 <https://github.com/pytest-dev/pytest/issues/4657>`_: Copy saferepr from pylib
97+
98+
2199
pytest 4.1.1 (2019-01-12)
22100
=========================
23101

changelog/4402.bugfix.rst

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

changelog/4536.bugfix.rst

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

changelog/4643.trivial.rst

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

changelog/4649.bugfix.rst

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

changelog/4653.bugfix.rst

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

changelog/4657.trivial.rst

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

changelog/4667.bugfix.rst

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

changelog/4669.bugfix.rst

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

0 commit comments

Comments
 (0)