Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pytest-dev/pytest
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7.4.0
Choose a base ref
...
head repository: pytest-dev/pytest
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7.4.2
Choose a head ref

Commits on Jun 23, 2023

  1. Merge pull request #11131 from pytest-dev/release-7.4.0

    Prepare release 7.4.0
    bluetech authored Jun 23, 2023
    Copy the full SHA
    fb03d13 View commit details

Commits on Jul 3, 2023

  1. Switch to deploy environment and configure for pypi oidc (#10925) (#1…

    …1162)
    
    Closes #10871
    Closes #10870
    
    Co-authored-by: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
    nicoddemus and RonnyPfannschmidt authored Jul 3, 2023
    Copy the full SHA
    b6c5578 View commit details
  2. [7.4.x] Fix duplicated imports with importlib mode and doctest-modules (

    #11164)
    
    Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
    github-actions[bot] and nicoddemus authored Jul 3, 2023
    Copy the full SHA
    a4d7254 View commit details

Commits on Jul 4, 2023

  1. [7.4.x] Update open trainings (#11172)

    Co-authored-by: Florian Bruhin <me@the-compiler.org>
    github-actions[bot] and The-Compiler authored Jul 4, 2023
    Copy the full SHA
    d539518 View commit details

Commits on Jul 8, 2023

  1. [7.4.x] Add child modules as attributes of parent modules. (#11163)

    * [7.4.x] Add child modules as attributes of parent modules.
    
    * Update 10337.bugfix.rst
    
    ---------
    
    Co-authored-by: akhilramkee <31619526+akhilramkee@users.noreply.github.com>
    Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
    3 people authored Jul 8, 2023
    Copy the full SHA
    c71b5df View commit details
  2. [7.4.x] Fix error assertion handling in approx when None in dict comp…

    …arison (#11180)
    
    Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
    github-actions[bot] and Zac-HD authored Jul 8, 2023
    Copy the full SHA
    511adf8 View commit details
  3. [7.4.x] reference: improve the node types docs a bit (#11181)

    Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
    github-actions[bot] and nicoddemus authored Jul 8, 2023
    Copy the full SHA
    a566b78 View commit details
  4. [7.4.x] doc: fix EncodingWarnings in examples (#11182)

    Co-authored-by: Ran Benita <ran@unusedvar.com>
    github-actions[bot] and bluetech authored Jul 8, 2023
    Copy the full SHA
    6dfe498 View commit details

Commits on Jul 9, 2023

  1. [7.4.x] Clarify docs for pytest.main default behavior (#11188)

    Co-authored-by: antosikv <79337398+antosikv@users.noreply.github.com>
    github-actions[bot] and antosikv authored Jul 9, 2023
    Copy the full SHA
    06ff7ca View commit details

Commits on Jul 22, 2023

  1. [7.4.x] Remove ep2023 training (#11242)

    Co-authored-by: Florian Bruhin <me@the-compiler.org>
    github-actions[bot] and The-Compiler authored Jul 22, 2023
    Copy the full SHA
    350122a View commit details

Commits on Aug 7, 2023

  1. [7.4.x] doc: update information about assertion messages (#11286)

    Co-authored-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
    github-actions[bot] and calestyo authored Aug 7, 2023
    Copy the full SHA
    34c7394 View commit details
  2. [7.4.x] doc: Link pytest.main to how-to guide (#11290)

    Co-authored-by: Florian Bruhin <me@the-compiler.org>
    github-actions[bot] and The-Compiler authored Aug 7, 2023
    Copy the full SHA
    e3fe728 View commit details
  3. ci: Use Python 3.8 to test latest pluggy

    Pluggy dropped Python 3.7 support.
    Also see 165fbbd
    
    Fixes #11293
    The-Compiler committed Aug 7, 2023
    Copy the full SHA
    ba40975 View commit details
  4. Merge pull request #11294 from The-Compiler/pluggy-py38

    ci: Use Python 3.8 to test latest pluggy
    nicoddemus authored Aug 7, 2023
    Copy the full SHA
    5c7c3f6 View commit details

Commits on Aug 8, 2023

  1. [7.4.x] Improve duplicate values documentation (#11296)

    Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
    github-actions[bot] and nicoddemus authored Aug 8, 2023
    Copy the full SHA
    6914071 View commit details

Commits on Aug 26, 2023

  1. [7.4.x] Fixes for typed pluggy (#11355)

    Since version 1.3 pluggy added typing, which requires some fixes to
    please mypy.
    bluetech authored Aug 26, 2023
    Copy the full SHA
    7a5f2fe View commit details

Commits on Aug 29, 2023

  1. [7.4.x] Issue 11354 fixing docs for lfnf (#11364)

    Co-authored-by: Sean Patrick Malloy <spmalloy@ucdavis.edu>
    github-actions[bot] and seanjedi authored Aug 29, 2023
    Copy the full SHA
    b170081 View commit details

Commits on Aug 30, 2023

  1. [7.4.x] Update CONTRIBUTING.rst (#11371)

    Co-authored-by: Sourabh Beniwal <sourabhbeniwal@outlook.com>
    github-actions[bot] and bsour authored Aug 30, 2023
    Copy the full SHA
    fbcfd3a View commit details

Commits on Sep 2, 2023

  1. Copy the full SHA
    7a0a0e8 View commit details
  2. Improve CI workflow

    * Build the package only once, and test on all platforms.
    * Deploy is now triggered manually via an Action, which is then responsible for tagging the repository after the package has been uploaded successfully.
    * Drop 'docs': we nowadays rely on readthedocs preview PR builds.
    nicoddemus committed Sep 2, 2023
    Copy the full SHA
    7855a72 View commit details
  3. Checkout source code during deploy

    We need the checked out repository in order to push the tag.
    nicoddemus committed Sep 2, 2023
    Copy the full SHA
    0319a0d View commit details
  4. Merge pull request #11377 from pytest-dev/release-7.4.1

    Prepare release 7.4.1
    nicoddemus authored Sep 2, 2023
    Copy the full SHA
    82eb86f View commit details

Commits on Sep 3, 2023

  1. Fix user_properties not saved to XML if fixture errors during teardown (

    #11382)
    
    Move handling of user_properties to `finalize()`.
    
    Previously if a fixture failed during teardown, `pytest_runtest_logreport` would not be called with "teardown", resulting in the user properties not being saved on the JUnit XML file.
    
    Fixes: #11367
    (cherry picked from commit 917ce9a)
    
    Co-authored-by: Israel Fruchter <israel.fruchter@gmail.com>
    nicoddemus and fruch authored Sep 3, 2023
    Copy the full SHA
    7f5d9b9 View commit details

Commits on Sep 5, 2023

  1. [7.4.x] Fix import_path for packages (#11395)

    Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
    github-actions[bot] and nicoddemus authored Sep 5, 2023
    Copy the full SHA
    1de00e9 View commit details

Commits on Sep 6, 2023

  1. [7.4.x] improve plugin list disclaimer (#11398)

    Co-authored-by: Stefaan Lippens <soxofaan@users.noreply.github.com>
    github-actions[bot] and soxofaan authored Sep 6, 2023
    Copy the full SHA
    de69883 View commit details
  2. [7.4.x] doc: Remove done training (#11400)

    Co-authored-by: Florian Bruhin <me@the-compiler.org>
    github-actions[bot] and The-Compiler authored Sep 6, 2023
    Copy the full SHA
    79c2012 View commit details

Commits on Sep 7, 2023

  1. [7.4.x] Fix doctest collection of functools.cached_property objects. (

    #11403)
    
    Co-authored-by: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
    github-actions[bot] and RonnyPfannschmidt authored Sep 7, 2023
    Copy the full SHA
    6e49a74 View commit details
  2. Fix crash when passing a very long cmdline argument (#11404)

    Fixes #11394
    
    (cherry picked from commit 28ccf47)
    nicoddemus committed Sep 7, 2023
    Copy the full SHA
    884b911 View commit details
  3. Use _pytest.pathlib.safe_exists in get_dirs_from_args

    Related to #11394
    nicoddemus committed Sep 7, 2023
    Copy the full SHA
    63b0c6f View commit details
  4. Merge pull request #11406 from nicoddemus/backport-11404-to-7.4.x

    [7.4.x] Fix crash when passing a very long cmdline argument (#11404)
    nicoddemus authored Sep 7, 2023
    Copy the full SHA
    e4f022f View commit details
  5. Prepare release version 7.4.2

    pytestbot committed Sep 7, 2023
    Copy the full SHA
    45f34df View commit details
Showing with 690 additions and 216 deletions.
  1. +44 −16 .github/workflows/deploy.yml
  2. +32 −24 .github/workflows/test.yml
  3. +4 −0 AUTHORS
  4. +1 −1 CONTRIBUTING.rst
  5. +4 −7 RELEASING.rst
  6. +2 −0 doc/en/announce/index.rst
  7. +20 −0 doc/en/announce/release-7.4.1.rst
  8. +18 −0 doc/en/announce/release-7.4.2.rst
  9. +2 −2 doc/en/builtin.rst
  10. +42 −0 doc/en/changelog.rst
  11. +1 −1 doc/en/example/nonpython/conftest.py
  12. +1 −1 doc/en/example/simple.rst
  13. +1 −1 doc/en/getting-started.rst
  14. +2 −3 doc/en/how-to/assert.rst
  15. +12 −5 doc/en/how-to/cache.rst
  16. +1 −1 doc/en/how-to/fixtures.rst
  17. +4 −4 doc/en/how-to/tmp_path.rst
  18. +2 −2 doc/en/how-to/unittest.rst
  19. +2 −1 doc/en/how-to/usage.rst
  20. +1 −2 doc/en/index.rst
  21. +17 −5 doc/en/reference/plugin_list.rst
  22. +86 −66 doc/en/reference/reference.rst
  23. +17 −5 scripts/update-plugin-list.py
  24. +5 −1 src/_pytest/cacheprovider.py
  25. +13 −13 src/_pytest/config/__init__.py
  26. +1 −8 src/_pytest/config/findpaths.py
  27. +20 −0 src/_pytest/doctest.py
  28. +5 −1 src/_pytest/helpconfig.py
  29. +4 −3 src/_pytest/junitxml.py
  30. +2 −0 src/_pytest/logging.py
  31. +7 −1 src/_pytest/main.py
  32. +13 −8 src/_pytest/nodes.py
  33. +29 −1 src/_pytest/pathlib.py
  34. +1 −1 src/_pytest/pytester.py
  35. +12 −10 src/_pytest/python.py
  36. +13 −12 src/_pytest/python_api.py
  37. +35 −0 testing/acceptance_test.py
  38. +17 −0 testing/python/approx.py
  39. +21 −0 testing/test_doctest.py
  40. +30 −0 testing/test_junitxml.py
  41. +31 −0 testing/test_main.py
  42. +107 −8 testing/test_pathlib.py
  43. +8 −2 testing/test_pluginmanager.py
60 changes: 44 additions & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
name: deploy

on:
push:
tags:
# These tags are protected, see:
# https://github.com/pytest-dev/pytest/settings/tag_protection
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: true
default: '1.2.3'


# Set permissions at the job level.
permissions: {}

jobs:

deploy:
if: github.repository == 'pytest-dev/pytest'

package:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: write
env:
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event.inputs.version }}
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
@@ -31,21 +28,52 @@ jobs:
- name: Build and Check Package
uses: hynek/build-and-inspect-python-package@v1.5

deploy:
if: github.repository == 'pytest-dev/pytest'
needs: [package]
runs-on: ubuntu-latest
environment: deploy
timeout-minutes: 30
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Download Package
uses: actions/download-artifact@v3
with:
name: Packages
path: dist

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@v1.8.5

- name: Push tag
run: |
git config user.name "pytest bot"
git config user.email "pytestbot@gmail.com"
git tag --annotate --message=v${{ github.event.inputs.version }} v${{ github.event.inputs.version }} ${{ github.sha }}
git push origin v${{ github.event.inputs.version }}
release-notes:

# todo: generate the content in the build job
# the goal being of using a github action script to push the release data
# after success instead of creating a complete python/tox env
needs: [deploy]
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
password: ${{ secrets.pypi_token }}
fetch-depth: 0
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.7"
python-version: "3.10"

- name: Install tox
run: |
56 changes: 32 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -27,7 +27,19 @@ concurrency:
permissions: {}

jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- name: Build and Check Package
uses: hynek/build-and-inspect-python-package@v1.5

build:
needs: [package]

runs-on: ${{ matrix.os }}
timeout-minutes: 45
permissions:
@@ -38,17 +50,17 @@ jobs:
matrix:
name: [
"windows-py37",
"windows-py37-pluggy",
"windows-py38",
"windows-py38-pluggy",
"windows-py39",
"windows-py310",
"windows-py311",
"windows-py312",

"ubuntu-py37",
"ubuntu-py37-pluggy",
"ubuntu-py37-freeze",
"ubuntu-py38",
"ubuntu-py38-pluggy",
"ubuntu-py39",
"ubuntu-py310",
"ubuntu-py311",
@@ -60,7 +72,6 @@ jobs:
"macos-py310",
"macos-py312",

"docs",
"doctesting",
"plugins",
]
@@ -70,15 +81,15 @@ jobs:
python: "3.7"
os: windows-latest
tox_env: "py37-numpy"
- name: "windows-py37-pluggy"
python: "3.7"
os: windows-latest
tox_env: "py37-pluggymain-pylib-xdist"
- name: "windows-py38"
python: "3.8"
os: windows-latest
tox_env: "py38-unittestextras"
use_coverage: true
- name: "windows-py38-pluggy"
python: "3.8"
os: windows-latest
tox_env: "py38-pluggymain-pylib-xdist"
- name: "windows-py39"
python: "3.9"
os: windows-latest
@@ -101,10 +112,6 @@ jobs:
os: ubuntu-latest
tox_env: "py37-lsof-numpy-pexpect"
use_coverage: true
- name: "ubuntu-py37-pluggy"
python: "3.7"
os: ubuntu-latest
tox_env: "py37-pluggymain-pylib-xdist"
- name: "ubuntu-py37-freeze"
python: "3.7"
os: ubuntu-latest
@@ -113,6 +120,10 @@ jobs:
python: "3.8"
os: ubuntu-latest
tox_env: "py38-xdist"
- name: "ubuntu-py38-pluggy"
python: "3.8"
os: ubuntu-latest
tox_env: "py38-pluggymain-pylib-xdist"
- name: "ubuntu-py39"
python: "3.9"
os: ubuntu-latest
@@ -159,10 +170,6 @@ jobs:
os: ubuntu-latest
tox_env: "plugins"

- name: "docs"
python: "3.7"
os: ubuntu-latest
tox_env: "docs"
- name: "doctesting"
python: "3.7"
os: ubuntu-latest
@@ -175,6 +182,12 @@ jobs:
fetch-depth: 0
persist-credentials: false

- name: Download Package
uses: actions/download-artifact@v3
with:
name: Packages
path: dist

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
@@ -188,11 +201,13 @@ jobs:
- name: Test without coverage
if: "! matrix.use_coverage"
run: "tox -e ${{ matrix.tox_env }}"
shell: bash
run: tox run -e ${{ matrix.tox_env }} --installpkg `find dist/*.tar.gz`

- name: Test with coverage
if: "matrix.use_coverage"
run: "tox -e ${{ matrix.tox_env }}-coverage"
shell: bash
run: tox run -e ${{ matrix.tox_env }}-coverage --installpkg `find dist/*.tar.gz`

- name: Generate coverage report
if: "matrix.use_coverage"
@@ -206,10 +221,3 @@ jobs:
fail_ci_if_error: true
files: ./coverage.xml
verbose: true

check-package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build and Check Package
uses: hynek/build-and-inspect-python-package@v1.5
4 changes: 4 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -166,6 +166,8 @@ Ian Bicking
Ian Lesperance
Ilya Konstantinov
Ionuț Turturică
Isaac Virshup
Israel Fruchter
Itxaso Aizpurua
Iwan Briquemont
Jaap Broekhuizen
@@ -339,6 +341,7 @@ Simon Holesch
Simon Kerr
Skylar Downes
Srinivas Reddy Thatiparthy
Stefaan Lippens
Stefan Farmbauer
Stefan Scherfke
Stefan Zimmermann
@@ -371,6 +374,7 @@ Tony Narlock
Tor Colvin
Trevor Bekolay
Tyler Goodlet
Tyler Smart
Tzu-ping Chung
Vasily Kuznetsov
Victor Maryama
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ Fix bugs
--------

Look through the `GitHub issues for bugs <https://github.com/pytest-dev/pytest/labels/type:%20bug>`_.
See also the `"status: easy" issues <https://github.com/pytest-dev/pytest/labels/status%3A%20easy>`_
See also the `"good first issue" issues <https://github.com/pytest-dev/pytest/labels/good%20first%20issue>`_
that are friendly to new contributors.

:ref:`Talk <contact>` to developers to find out how you can fix specific bugs. To indicate that you are going
11 changes: 4 additions & 7 deletions RELEASING.rst
Original file line number Diff line number Diff line change
@@ -133,14 +133,11 @@ Releasing

Both automatic and manual processes described above follow the same steps from this point onward.

#. After all tests pass and the PR has been approved, tag the release commit
in the ``release-MAJOR.MINOR.PATCH`` branch and push it. This will publish to PyPI::
#. After all tests pass and the PR has been approved, trigger the ``deploy`` job
in https://github.com/pytest-dev/pytest/actions/workflows/deploy.yml.

git fetch upstream
git tag MAJOR.MINOR.PATCH upstream/release-MAJOR.MINOR.PATCH
git push upstream MAJOR.MINOR.PATCH

Wait for the deploy to complete, then make sure it is `available on PyPI <https://pypi.org/project/pytest>`_.
This job will require approval from ``pytest-dev/core``, after which it will publish to PyPI
and tag the repository.

#. Merge the PR. **Make sure it's not squash-merged**, so that the tagged commit ends up in the main branch.

2 changes: 2 additions & 0 deletions doc/en/announce/index.rst
Original file line number Diff line number Diff line change
@@ -6,6 +6,8 @@ Release announcements
:maxdepth: 2


release-7.4.2
release-7.4.1
release-7.4.0
release-7.3.2
release-7.3.1
20 changes: 20 additions & 0 deletions doc/en/announce/release-7.4.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
pytest-7.4.1
=======================================

pytest 7.4.1 has just been released to PyPI.

This is a bug-fix release, being a drop-in replacement. To upgrade::

pip install --upgrade pytest

The full changelog is available at https://docs.pytest.org/en/stable/changelog.html.

Thanks to all of the contributors to this release:

* Bruno Oliveira
* Florian Bruhin
* Ran Benita


Happy testing,
The pytest Development Team
18 changes: 18 additions & 0 deletions doc/en/announce/release-7.4.2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
pytest-7.4.2
=======================================

pytest 7.4.2 has just been released to PyPI.

This is a bug-fix release, being a drop-in replacement. To upgrade::

pip install --upgrade pytest

The full changelog is available at https://docs.pytest.org/en/stable/changelog.html.

Thanks to all of the contributors to this release:

* Bruno Oliveira


Happy testing,
The pytest Development Team
4 changes: 2 additions & 2 deletions doc/en/builtin.rst
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
cachedir: .pytest_cache
rootdir: /home/sweet/project
collected 0 items
cache -- .../_pytest/cacheprovider.py:528
cache -- .../_pytest/cacheprovider.py:532
Return a cache object that can persist state between testing sessions.
cache.get(key, default)
@@ -105,7 +105,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
captured = capsys.readouterr()
assert captured.out == "hello\n"
doctest_namespace [session scope] -- .../_pytest/doctest.py:737
doctest_namespace [session scope] -- .../_pytest/doctest.py:757
Fixture that returns a :py:class:`dict` that will be injected into the
namespace of doctests.
Loading