Skip to content

Commit 80aa8f2

Browse files
Merge branch 'main' into fix-implicit-str-concat-and-discovered-bug-due-to-it
2 parents de40249 + 26215b8 commit 80aa8f2

File tree

20 files changed

+267
-165
lines changed

20 files changed

+267
-165
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ jobs:
147147
- name: "ubuntu-py313"
148148
python: "3.13-dev"
149149
os: ubuntu-latest
150-
tox_env: "py313"
150+
tox_env: "py313-pexpect"
151151
use_coverage: true
152152
- name: "ubuntu-pypy3"
153153
python: "pypy-3.9"

.pre-commit-config.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ repos:
3232
hooks:
3333
- id: mypy
3434
files: ^(src/|testing/|scripts/)
35-
args: []
36-
language_version: "3.8"
3735
additional_dependencies:
3836
- iniconfig>=1.1.0
3937
- attrs>=19.2.0
@@ -46,13 +44,13 @@ repos:
4644
# on <3.11
4745
- exceptiongroup>=1.0.0rc8
4846
- repo: https://github.com/tox-dev/pyproject-fmt
49-
rev: "2.2.4"
47+
rev: "2.3.1"
5048
hooks:
5149
- id: pyproject-fmt
5250
# https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version
5351
additional_dependencies: ["tox>=4.9"]
5452
- repo: https://github.com/asottile/pyupgrade
55-
rev: v3.17.0
53+
rev: v3.18.0
5654
hooks:
5755
- id: pyupgrade
5856
stages: [manual]

AUTHORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ Dave Hunt
118118
David Díaz-Barquero
119119
David Mohr
120120
David Paul Röthlisberger
121+
David Peled
121122
David Szotten
122123
David Vierra
123124
Daw-Ran Liou
@@ -408,6 +409,7 @@ Sviatoslav Sydorenko
408409
Sylvain Marié
409410
Tadek Teleżyński
410411
Takafumi Arakaki
412+
Takumi Otani
411413
Taneli Hukkinen
412414
Tanvi Mehta
413415
Tanya Agarwal

changelog/10558.doc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix ambiguous docstring of :func:`pytest.Config.getoption`.

changelog/12497.contrib.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed two failing pdb-related tests on Python 3.13.

changelog/12866.doc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Improved cross-references concerning the :fixture:`recwarn` fixture.

changelog/9037.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Honor :confval:`disable_test_id_escaping_and_forfeit_all_rights_to_community_support` when escaping ids in parametrized tests.

doc/en/builtin.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
234234
recwarn -- .../_pytest/recwarn.py:35
235235
Return a :class:`WarningsRecorder` instance that records all warnings emitted by test functions.
236236
237-
See https://docs.pytest.org/en/latest/how-to/capture-warnings.html for information
238-
on warning categories.
237+
See :ref:`warnings` for information on warning categories.
239238
240239
tmp_path_factory [session scope] -- .../_pytest/tmpdir.py:242
241240
Return a :class:`pytest.TempPathFactory` instance for the test session.

doc/en/how-to/capture-warnings.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ user code and third-party libraries, as recommended by :pep:`565`.
195195
This helps users keep their code modern and avoid breakages when deprecated warnings are effectively removed.
196196

197197
However, in the specific case where users capture any type of warnings in their test, either with
198-
:func:`pytest.warns`, :func:`pytest.deprecated_call` or using the :ref:`recwarn <recwarn>` fixture,
198+
:func:`pytest.warns`, :func:`pytest.deprecated_call` or using the :fixture:`recwarn` fixture,
199199
no warning will be displayed at all.
200200

201201
Sometimes it is useful to hide some specific deprecation warnings that happen in code that you have no control over
@@ -332,10 +332,10 @@ additional information:
332332
assert record[0].message.args[0] == "another warning"
333333
334334
Alternatively, you can examine raised warnings in detail using the
335-
:ref:`recwarn <recwarn>` fixture (see below).
335+
:fixture:`recwarn` fixture (see :ref:`below <recwarn>`).
336336

337337

338-
The :ref:`recwarn <recwarn>` fixture automatically ensures to reset the warnings
338+
The :fixture:`recwarn` fixture automatically ensures to reset the warnings
339339
filter at the end of the test, so no global state is leaked.
340340

341341
.. _`recording warnings`:
@@ -345,8 +345,8 @@ filter at the end of the test, so no global state is leaked.
345345
Recording warnings
346346
------------------
347347

348-
You can record raised warnings either using :func:`pytest.warns` or with
349-
the ``recwarn`` fixture.
348+
You can record raised warnings either using the :func:`pytest.warns` context manager or with
349+
the :fixture:`recwarn` fixture.
350350

351351
To record with :func:`pytest.warns` without asserting anything about the warnings,
352352
pass no arguments as the expected warning type and it will default to a generic Warning:
@@ -361,7 +361,7 @@ pass no arguments as the expected warning type and it will default to a generic
361361
assert str(record[0].message) == "user"
362362
assert str(record[1].message) == "runtime"
363363
364-
The ``recwarn`` fixture will record warnings for the whole function:
364+
The :fixture:`recwarn` fixture will record warnings for the whole function:
365365

366366
.. code-block:: python
367367
@@ -377,12 +377,11 @@ The ``recwarn`` fixture will record warnings for the whole function:
377377
assert w.filename
378378
assert w.lineno
379379
380-
Both ``recwarn`` and :func:`pytest.warns` return the same interface for recorded
381-
warnings: a WarningsRecorder instance. To view the recorded warnings, you can
380+
Both the :fixture:`recwarn` fixture and the :func:`pytest.warns` context manager return the same interface for recorded
381+
warnings: a :class:`~_pytest.recwarn.WarningsRecorder` instance. To view the recorded warnings, you can
382382
iterate over this instance, call ``len`` on it to get the number of recorded
383383
warnings, or index into it to get a particular recorded warning.
384384

385-
Full API: :class:`~_pytest.recwarn.WarningsRecorder`.
386385

387386
.. _`warns use cases`:
388387

0 commit comments

Comments
 (0)