-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-invalid-regex-in-filterwarnings
- Loading branch information
Showing
45 changed files
with
1,157 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ jobs: | |
persist-credentials: false | ||
|
||
- name: Build and Check Package | ||
uses: hynek/build-and-inspect-python-package@v2.11.0 | ||
uses: hynek/build-and-inspect-python-package@v2.12.0 | ||
with: | ||
attest-build-provenance-github: 'true' | ||
|
||
|
@@ -56,7 +56,7 @@ jobs: | |
path: dist | ||
|
||
- name: Publish package to PyPI | ||
uses: pypa/[email protected].3 | ||
uses: pypa/[email protected].4 | ||
with: | ||
attestations: true | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,7 @@ jobs: | |
|
||
- name: Create Pull Request | ||
id: pr | ||
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f | ||
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f | ||
with: | ||
commit-message: '[automated] Update plugin list' | ||
author: 'pytest bot <[email protected]>' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -168,4 +168,8 @@ Both automatic and manual processes described above follow the same steps from t | |
* [email protected] (all releases) | ||
* [email protected] (only major/minor releases) | ||
|
||
And announce it on `Twitter <https://twitter.com/>`_ and `BlueSky <https://bsky.app/>`_ with the ``#pytest`` hashtag. | ||
And announce it with the ``#pytest`` hashtag on: | ||
|
||
* `Bluesky <https://bsky.app>`_ | ||
* `Fosstodon <https://fosstodon.org>`_ | ||
* `Twitter/X <https://x.com>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
pytest's ``short`` and ``long`` traceback styles (:ref:`how-to-modifying-python-tb-printing`) | ||
now have partial :pep:`657` support and will show specific code segments in the | ||
traceback. | ||
|
||
.. code-block:: pytest | ||
================================= FAILURES ================================= | ||
_______________________ test_gets_correct_tracebacks _______________________ | ||
test_tracebacks.py:12: in test_gets_correct_tracebacks | ||
assert manhattan_distance(p1, p2) == 1 | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
test_tracebacks.py:6: in manhattan_distance | ||
return abs(point_1.x - point_2.x) + abs(point_1.y - point_2.y) | ||
^^^^^^^^^ | ||
E AttributeError: 'NoneType' object has no attribute 'x' | ||
-- by :user:`ammaraskar` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fixed issue where sequences were still being shortened even with ``-vv`` verbosity. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
New `--force-short-summary` option to force condensed summary output regardless of verbosity level. | ||
|
||
This lets users still see condensed summary output of failures for quick reference in log files from job outputs, being especially useful if non-condensed output is very verbose. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Allows supplying ``ExceptionGroup[Exception]`` and ``BaseExceptionGroup[BaseException]`` to ``pytest.raises`` to keep full typing on :class:`ExceptionInfo <pytest.ExceptionInfo>`: | ||
|
||
.. code-block:: python | ||
with pytest.raises(ExceptionGroup[Exception]) as exc_info: | ||
some_function() | ||
Parametrizing with other exception types remains an error - we do not check the types of child exceptions and thus do not permit code that might look like we do. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
The ``--stepwise`` mode received a number of improvements: | ||
|
||
* It no longer forgets the last failed test in case pytest is executed later without the flag. | ||
|
||
This enables the following workflow: | ||
|
||
1. Execute pytest with ``--stepwise``, pytest then stops at the first failing test; | ||
2. Iteratively update the code and run the test in isolation, without the ``--stepwise`` flag (for example in an IDE), until it is fixed. | ||
3. Execute pytest with ``--stepwise`` again and pytest will continue from the previously failed test, and if it passes, continue on to the next tests. | ||
|
||
Previously, at step 3, pytest would start from the beginning, forgetting the previously failed test. | ||
|
||
This change however might cause issues if the ``--stepwise`` mode is used far apart in time, as the state might get stale, so the internal state will be reset automatically in case the test suite changes (for now only the number of tests are considered for this, we might change/improve this on the future). | ||
|
||
* New ``--stepwise-reset``/``--sw-reset`` flag, allowing the user to explicitly reset the stepwise state and restart the workflow from the beginning. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
:confval:`console_output_style` now supports ``times`` to show execution time of each test. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,13 @@ Chat | |
<https://web.libera.chat/#pytest>`_) | ||
- ``#pytest`` `on Matrix <https://matrix.to/#/#pytest:matrix.org>`_. | ||
|
||
Microblogging | ||
------------- | ||
|
||
- Bluesky: `@pytest.org <https://bsky.app/profile/pytest.org>`_ | ||
- Mastodon: `@[email protected] <https://fosstodon.org/@pytest>`_ | ||
- Twitter/X: `@pytestdotorg <https://x.com/pytestdotorg>`_ | ||
|
||
---- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.