Skip to content

Commit ba0da81

Browse files
authoredSep 2, 2023
Merge pull request #11379 from nicoddemus/cherry-pick-release
Merge pull request #11377 from pytest-dev/release-7.4.1
2 parents 5b528bd + f08782d commit ba0da81

12 files changed

+59
-24
lines changed
 

‎.github/workflows/deploy.yml

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
permissions:
3838
id-token: write
3939
steps:
40+
- uses: actions/checkout@v3
4041
- name: Download Package
4142
uses: actions/download-artifact@v3
4243
with:

‎changelog/10337.bugfix.rst

-2
This file was deleted.

‎changelog/10702.bugfix.rst

-1
This file was deleted.

‎changelog/10811.bugfix.rst

-2
This file was deleted.

‎doc/en/announce/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Release announcements
66
:maxdepth: 2
77

88

9+
release-7.4.1
910
release-7.4.0
1011
release-7.3.2
1112
release-7.3.1

‎doc/en/announce/release-7.4.1.rst

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
pytest-7.4.1
2+
=======================================
3+
4+
pytest 7.4.1 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/stable/changelog.html.
11+
12+
Thanks to all of the contributors to this release:
13+
14+
* Bruno Oliveira
15+
* Florian Bruhin
16+
* Ran Benita
17+
18+
19+
Happy testing,
20+
The pytest Development Team

‎doc/en/builtin.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
2222
cachedir: .pytest_cache
2323
rootdir: /home/sweet/project
2424
collected 0 items
25-
cache -- .../_pytest/cacheprovider.py:528
25+
cache -- .../_pytest/cacheprovider.py:532
2626
Return a cache object that can persist state between testing sessions.
2727
2828
cache.get(key, default)

‎doc/en/changelog.rst

+17
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,23 @@ with advance notice in the **Deprecations** section of releases.
2828

2929
.. towncrier release notes start
3030
31+
pytest 7.4.1 (2023-09-02)
32+
=========================
33+
34+
Bug Fixes
35+
---------
36+
37+
- `#10337 <https://github.com/pytest-dev/pytest/issues/10337>`_: Fixed bug where fake intermediate modules generated by ``--import-mode=importlib`` would not include the
38+
child modules as attributes of the parent modules.
39+
40+
41+
- `#10702 <https://github.com/pytest-dev/pytest/issues/10702>`_: Fixed error assertion handling in :func:`pytest.approx` when ``None`` is an expected or received value when comparing dictionaries.
42+
43+
44+
- `#10811 <https://github.com/pytest-dev/pytest/issues/10811>`_: Fixed issue when using ``--import-mode=importlib`` together with ``--doctest-modules`` that caused modules
45+
to be imported more than once, causing problems with modules that have import side effects.
46+
47+
3148
pytest 7.4.0 (2023-06-23)
3249
=========================
3350

‎doc/en/example/reportingdemo.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -554,13 +554,13 @@ Here is a nice run of several failures and how ``pytest`` presents things:
554554
E AssertionError: assert False
555555
E + where False = <built-in method startswith of str object at 0xdeadbeef0027>('456')
556556
E + where <built-in method startswith of str object at 0xdeadbeef0027> = '123'.startswith
557-
E + where '123' = <function TestMoreErrors.test_startswith_nested.<locals>.f at 0xdeadbeef0029>()
558-
E + and '456' = <function TestMoreErrors.test_startswith_nested.<locals>.g at 0xdeadbeef002a>()
557+
E + where '123' = <function TestMoreErrors.test_startswith_nested.<locals>.f at 0xdeadbeef0006>()
558+
E + and '456' = <function TestMoreErrors.test_startswith_nested.<locals>.g at 0xdeadbeef0029>()
559559
560560
failure_demo.py:235: AssertionError
561561
_____________________ TestMoreErrors.test_global_func ______________________
562562
563-
self = <failure_demo.TestMoreErrors object at 0xdeadbeef002b>
563+
self = <failure_demo.TestMoreErrors object at 0xdeadbeef002a>
564564
565565
def test_global_func(self):
566566
> assert isinstance(globf(42), float)
@@ -571,18 +571,18 @@ Here is a nice run of several failures and how ``pytest`` presents things:
571571
failure_demo.py:238: AssertionError
572572
_______________________ TestMoreErrors.test_instance _______________________
573573
574-
self = <failure_demo.TestMoreErrors object at 0xdeadbeef002c>
574+
self = <failure_demo.TestMoreErrors object at 0xdeadbeef002b>
575575
576576
def test_instance(self):
577577
self.x = 6 * 7
578578
> assert self.x != 42
579579
E assert 42 != 42
580-
E + where 42 = <failure_demo.TestMoreErrors object at 0xdeadbeef002c>.x
580+
E + where 42 = <failure_demo.TestMoreErrors object at 0xdeadbeef002b>.x
581581
582582
failure_demo.py:242: AssertionError
583583
_______________________ TestMoreErrors.test_compare ________________________
584584
585-
self = <failure_demo.TestMoreErrors object at 0xdeadbeef002d>
585+
self = <failure_demo.TestMoreErrors object at 0xdeadbeef002c>
586586
587587
def test_compare(self):
588588
> assert globf(10) < 5
@@ -592,7 +592,7 @@ Here is a nice run of several failures and how ``pytest`` presents things:
592592
failure_demo.py:245: AssertionError
593593
_____________________ TestMoreErrors.test_try_finally ______________________
594594
595-
self = <failure_demo.TestMoreErrors object at 0xdeadbeef002e>
595+
self = <failure_demo.TestMoreErrors object at 0xdeadbeef002d>
596596
597597
def test_try_finally(self):
598598
x = 1
@@ -603,7 +603,7 @@ Here is a nice run of several failures and how ``pytest`` presents things:
603603
failure_demo.py:250: AssertionError
604604
___________________ TestCustomAssertMsg.test_single_line ___________________
605605
606-
self = <failure_demo.TestCustomAssertMsg object at 0xdeadbeef002f>
606+
self = <failure_demo.TestCustomAssertMsg object at 0xdeadbeef002e>
607607
608608
def test_single_line(self):
609609
class A:
@@ -618,7 +618,7 @@ Here is a nice run of several failures and how ``pytest`` presents things:
618618
failure_demo.py:261: AssertionError
619619
____________________ TestCustomAssertMsg.test_multiline ____________________
620620
621-
self = <failure_demo.TestCustomAssertMsg object at 0xdeadbeef0030>
621+
self = <failure_demo.TestCustomAssertMsg object at 0xdeadbeef002f>
622622
623623
def test_multiline(self):
624624
class A:
@@ -637,7 +637,7 @@ Here is a nice run of several failures and how ``pytest`` presents things:
637637
failure_demo.py:268: AssertionError
638638
___________________ TestCustomAssertMsg.test_custom_repr ___________________
639639
640-
self = <failure_demo.TestCustomAssertMsg object at 0xdeadbeef0031>
640+
self = <failure_demo.TestCustomAssertMsg object at 0xdeadbeef0030>
641641
642642
def test_custom_repr(self):
643643
class JSON:

‎doc/en/getting-started.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Install ``pytest``
2222
.. code-block:: bash
2323
2424
$ pytest --version
25-
pytest 7.4.0
25+
pytest 7.4.1
2626
2727
.. _`simpletest`:
2828

‎doc/en/how-to/tmp_path.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ Running this would result in a passed test except for the last
5151
d = tmp_path / "sub"
5252
d.mkdir()
5353
p = d / "hello.txt"
54-
p.write_text(CONTENT)
55-
assert p.read_text() == CONTENT
54+
p.write_text(CONTENT, encoding="utf-8")
55+
assert p.read_text(encoding="utf-8") == CONTENT
5656
assert len(list(tmp_path.iterdir())) == 1
5757
> assert 0
5858
E assert 0

‎doc/en/reference/reference.rst

+6-5
Original file line numberDiff line numberDiff line change
@@ -1892,11 +1892,12 @@ All the command-line flags can be obtained by running ``pytest --help``::
18921892
tests. Optional argument: glob (default: '*').
18931893
--cache-clear Remove all cache contents at start of test run
18941894
--lfnf={all,none}, --last-failed-no-failures={all,none}
1895-
With ``--lf``, determines whether to execute tests when there
1896-
are no previously (known) failures or when no
1897-
cached ``lastfailed`` data was found.
1898-
``all`` (the default) runs the full test suite again.
1899-
``none`` just emits a message about no known failures and exits successfully.
1895+
With ``--lf``, determines whether to execute tests
1896+
when there are no previously (known) failures or
1897+
when no cached ``lastfailed`` data was found.
1898+
``all`` (the default) runs the full test suite
1899+
again. ``none`` just emits a message about no known
1900+
failures and exits successfully.
19001901
--sw, --stepwise Exit on test failure and continue from last failing
19011902
test next time
19021903
--sw-skip, --stepwise-skip

0 commit comments

Comments
 (0)
Please sign in to comment.