Skip to content

Commit a2d4833

Browse files
authored
Merge pull request #6201 from asottile/mm
Merge master into features
2 parents bac6eeb + cc78444 commit a2d4833

File tree

16 files changed

+141
-26
lines changed

16 files changed

+141
-26
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
Thanks for submitting a PR, your contribution is really appreciated!
33
44
Here is a quick checklist that should be present in PRs.
5-
(please delete this text from the final description, this is just a guideline)
6-
-->
75
86
- [ ] Target the `master` branch for bug fixes, documentation updates and trivial changes.
97
- [ ] Target the `features` branch for new features, improvements, and removals/deprecations.
108
- [ ] Include documentation when adding new features.
119
- [ ] Include new tests or update existing tests when applicable.
1210
13-
Unless your change is trivial or a small documentation fix (e.g., a typo or reword of a small section) please:
11+
Unless your change is trivial or a small documentation fix (e.g., a typo or reword of a small section) please:
1412
1513
- [ ] Create a new changelog file in the `changelog` folder, with a name like `<ISSUE NUMBER>.<TYPE>.rst`. See [changelog/README.rst](https://github.com/pytest-dev/pytest/blob/master/changelog/README.rst) for details.
16-
- [ ] Add yourself to `AUTHORS` in alphabetical order;
14+
- [ ] Add yourself to `AUTHORS` in alphabetical order.
15+
-->

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ Daniel Hahler
7070
Daniel Nuri
7171
Daniel Wandschneider
7272
Danielle Jenkins
73+
Daniil Galiev
7374
Dave Hunt
7475
David Díaz-Barquero
7576
David Mohr

CHANGELOG.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,34 @@ with advance notice in the **Deprecations** section of releases.
1818
1919
.. towncrier release notes start
2020
21+
pytest 5.2.4 (2019-11-15)
22+
=========================
23+
24+
Bug Fixes
25+
---------
26+
27+
- `#6194 <https://github.com/pytest-dev/pytest/issues/6194>`_: Fix incorrect discovery of non-test ``__init__.py`` files.
28+
29+
30+
- `#6197 <https://github.com/pytest-dev/pytest/issues/6197>`_: Revert "The first test in a package (``__init__.py``) marked with ``@pytest.mark.skip`` is now correctly skipped.".
31+
32+
33+
pytest 5.2.3 (2019-11-14)
34+
=========================
35+
36+
Bug Fixes
37+
---------
38+
39+
- `#5830 <https://github.com/pytest-dev/pytest/issues/5830>`_: The first test in a package (``__init__.py``) marked with ``@pytest.mark.skip`` is now correctly skipped.
40+
41+
42+
- `#6099 <https://github.com/pytest-dev/pytest/issues/6099>`_: Fix ``--trace`` when used with parametrized functions.
43+
44+
45+
- `#6183 <https://github.com/pytest-dev/pytest/issues/6183>`_: Using ``request`` as a parameter name in ``@pytest.mark.parametrize`` now produces a more
46+
user-friendly error.
47+
48+
2149
pytest 5.2.2 (2019-10-24)
2250
=========================
2351

changelog/6099.bugfix.rst

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

doc/en/announce/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Release announcements
66
:maxdepth: 2
77

88

9+
release-5.2.4
10+
release-5.2.3
911
release-5.2.2
1012
release-5.2.1
1113
release-5.2.0

doc/en/announce/release-5.2.3.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
pytest-5.2.3
2+
=======================================
3+
4+
pytest 5.2.3 has just been released to PyPI.
5+
6+
This is a bug-fix release, being a drop-in replacement. To upgrade::
7+
8+
pip install --upgrade pytest
9+
10+
The full changelog is available at https://docs.pytest.org/en/latest/changelog.html.
11+
12+
Thanks to all who contributed to this release, among them:
13+
14+
* Anthony Sottile
15+
* Brett Cannon
16+
* Bruno Oliveira
17+
* Daniel Hahler
18+
* Daniil Galiev
19+
* David Szotten
20+
* Florian Bruhin
21+
* Patrick Harmon
22+
* Ran Benita
23+
* Zac Hatfield-Dodds
24+
* Zak Hassan
25+
26+
27+
Happy testing,
28+
The pytest Development Team

doc/en/announce/release-5.2.4.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
pytest-5.2.4
2+
=======================================
3+
4+
pytest 5.2.4 has just been released to PyPI.
5+
6+
This is a bug-fix release, being a drop-in replacement. To upgrade::
7+
8+
pip install --upgrade pytest
9+
10+
The full changelog is available at https://docs.pytest.org/en/latest/changelog.html.
11+
12+
Thanks to all who contributed to this release, among them:
13+
14+
* Anthony Sottile
15+
* Bruno Oliveira
16+
* Daniel Hahler
17+
* Hugo
18+
* Michael Shields
19+
20+
21+
Happy testing,
22+
The pytest Development Team

doc/en/example/parametrize.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -475,11 +475,10 @@ Running it results in some skips if we don't have all the python interpreters in
475475
.. code-block:: pytest
476476
477477
. $ pytest -rs -q multipython.py
478-
ssssssssssssssssssssssss... [100%]
478+
ssssssssssss......sss...... [100%]
479479
========================= short test summary info ==========================
480-
SKIPPED [12] $REGENDOC_TMPDIR/CWD/multipython.py:30: 'python3.5' not found
481-
SKIPPED [12] $REGENDOC_TMPDIR/CWD/multipython.py:30: 'python3.6' not found
482-
3 passed, 24 skipped in 0.12s
480+
SKIPPED [15] $REGENDOC_TMPDIR/CWD/multipython.py:30: 'python3.5' not found
481+
12 passed, 15 skipped in 0.12s
483482
484483
Indirect parametrization of optional implementations/imports
485484
--------------------------------------------------------------------

doc/en/example/reportingdemo.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ Here is a nice run of several failures and how ``pytest`` presents things:
436436
items = [1, 2, 3]
437437
print("items is {!r}".format(items))
438438
> a, b = items.pop()
439-
E TypeError: cannot unpack non-iterable int object
439+
E TypeError: 'int' object is not iterable
440440
441441
failure_demo.py:181: TypeError
442442
--------------------------- Captured stdout call ---------------------------
@@ -516,7 +516,7 @@ Here is a nice run of several failures and how ``pytest`` presents things:
516516
def test_z2_type_error(self):
517517
items = 3
518518
> a, b = items
519-
E TypeError: cannot unpack non-iterable int object
519+
E TypeError: 'int' object is not iterable
520520
521521
failure_demo.py:222: TypeError
522522
______________________ TestMoreErrors.test_startswith ______________________

doc/en/example/simple.rst

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -302,34 +302,31 @@ running from a test you can do something like this:
302302

303303
.. code-block:: python
304304
305-
# content of conftest.py
305+
# content of your_module.py
306306
307307
308-
def pytest_configure(config):
309-
import sys
308+
_called_from_test = False
310309
311-
sys._called_from_test = True
310+
.. code-block:: python
312311
312+
# content of conftest.py
313313
314-
def pytest_unconfigure(config):
315-
import sys
316314
317-
del sys._called_from_test
315+
def pytest_configure(config):
316+
your_module._called_from_test = True
318317
319-
and then check for the ``sys._called_from_test`` flag:
318+
and then check for the ``your_module._called_from_test`` flag:
320319

321320
.. code-block:: python
322321
323-
if hasattr(sys, "_called_from_test"):
322+
if your_module._called_from_test:
324323
# called from within a test run
325324
...
326325
else:
327326
# called "normally"
328327
...
329328
330-
accordingly in your application. It's also a good idea
331-
to use your own application module rather than ``sys``
332-
for handling flag.
329+
accordingly in your application.
333330

334331
Adding info to test report header
335332
--------------------------------------------------------------

0 commit comments

Comments
 (0)