Skip to content

Commit ad6542e

Browse files
committed
Merge remote-tracking branch 'origin/main' into raisesgroup
2 parents 9714dc0 + b0caf3d commit ad6542e

26 files changed

+437
-263
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: "v0.9.4"
3+
rev: "v0.9.6"
44
hooks:
55
- id: ruff
66
args: ["--fix"]
@@ -12,7 +12,7 @@ repos:
1212
- id: end-of-file-fixer
1313
- id: check-yaml
1414
- repo: https://github.com/woodruffw/zizmor-pre-commit
15-
rev: v1.3.0
15+
rev: v1.3.1
1616
hooks:
1717
- id: zizmor
1818
- repo: https://github.com/adamchainz/blacken-docs
@@ -32,7 +32,7 @@ repos:
3232
hooks:
3333
- id: python-use-type-annotations
3434
- repo: https://github.com/pre-commit/mirrors-mypy
35-
rev: v1.14.1
35+
rev: v1.15.0
3636
hooks:
3737
- id: mypy
3838
files: ^(src/|testing/|scripts/)

changelog/11381.improvement.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
The ``type`` parameter of the ``parser.addini`` method now accepts `"int"` and ``"float"`` parameters, facilitating the parsing of configuration values in the configuration file.
2+
3+
Example:
4+
5+
.. code-block:: python
6+
7+
def pytest_addoption(parser):
8+
parser.addini("int_value", type="int", default=2, help="my int value")
9+
parser.addini("float_value", type="float", default=4.2, help="my float value")
10+
11+
The `pytest.ini` file:
12+
13+
.. code-block:: ini
14+
15+
[pytest]
16+
int_value = 3
17+
float_value = 5.4

changelog/13175.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The diff is now also highlighted correctly when comparing two strings.

changelog/13221.doc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Improved grouping of CLI options in the ``--help`` output.

changelog/7683.improvement.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The formerly optional ``pygments`` dependency is now required, causing output always to be source-highlighted (unless disabled via the ``--code-highlight=no`` CLI option).

doc/en/how-to/capture-stdout-stderr.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ test from having to care about setting/resetting
131131
output streams and also interacts well with pytest's
132132
own per-test capturing.
133133

134-
The return value from ``readouterr`` changed to a ``namedtuple`` with two attributes, ``out`` and ``err``.
134+
The return value of ``readouterr()`` is a ``namedtuple`` with two attributes, ``out`` and ``err``.
135135

136136
If the code under test writes non-textual data (``bytes``), you can capture this using
137137
the :fixture:`capsysbinary` fixture which instead returns ``bytes`` from

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ See :ref:`@pytest.mark.filterwarnings <filterwarnings>` and
250250
the :envvar:`python:PYTHONWARNINGS` environment variable or the
251251
``-W`` command-line option, pytest will not configure any filters by default.
252252

253-
Also pytest doesn't follow :pep:`506` suggestion of resetting all warning filters because
253+
Also pytest doesn't follow :pep:`565` suggestion of resetting all warning filters because
254254
it might break test suites that configure warning filters themselves
255255
by calling :func:`warnings.simplefilter` (see :issue:`2430` for an example of that).
256256

doc/en/how-to/parametrize.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ pytest enables test parametrization at several levels:
2929

3030
.. regendoc: wipe
3131
32-
33-
34-
Several improvements.
35-
3632
The builtin :ref:`pytest.mark.parametrize ref` decorator enables
3733
parametrization of arguments for a test function. Here is a typical example
3834
of a test function that implements checking that a certain input leads

doc/en/reference/plugin_list.rst

Lines changed: 128 additions & 96 deletions
Large diffs are not rendered by default.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ dependencies = [
5151
"iniconfig",
5252
"packaging",
5353
"pluggy>=1.5,<2",
54+
"pygments>=2.7.2",
5455
"tomli>=1; python_version<'3.11'",
5556
]
5657
optional-dependencies.dev = [
5758
"argcomplete",
5859
"attrs>=19.2",
5960
"hypothesis>=3.56",
6061
"mock",
61-
"pygments>=2.7.2",
6262
"requests",
6363
"setuptools",
6464
"xmlschema",

0 commit comments

Comments
 (0)