Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 97eb0c0c9c |
@@ -9,9 +9,3 @@ updates:
|
|||||||
allow:
|
allow:
|
||||||
- dependency-type: direct
|
- dependency-type: direct
|
||||||
- dependency-type: indirect
|
- dependency-type: indirect
|
||||||
- package-ecosystem: github-actions
|
|
||||||
directory: /
|
|
||||||
schedule:
|
|
||||||
interval: weekly
|
|
||||||
time: "03:00"
|
|
||||||
open-pull-requests-limit: 10
|
|
||||||
|
|||||||
@@ -1,51 +0,0 @@
|
|||||||
name: backport
|
|
||||||
|
|
||||||
on:
|
|
||||||
# Note that `pull_request_target` has security implications:
|
|
||||||
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
|
|
||||||
# In particular:
|
|
||||||
# - Only allow triggers that can be used only be trusted users
|
|
||||||
# - Don't execute any code from the target branch
|
|
||||||
# - Don't use cache
|
|
||||||
pull_request_target:
|
|
||||||
types: [labeled]
|
|
||||||
|
|
||||||
# Set permissions at the job level.
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
backport:
|
|
||||||
if: startsWith(github.event.label.name, 'backport ') && github.event.pull_request.merged
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
persist-credentials: true
|
|
||||||
|
|
||||||
- name: Create backport PR
|
|
||||||
run: |
|
|
||||||
set -eux
|
|
||||||
|
|
||||||
git config --global user.name "pytest bot"
|
|
||||||
git config --global user.email "pytestbot@gmail.com"
|
|
||||||
|
|
||||||
label='${{ github.event.label.name }}'
|
|
||||||
target_branch="${label#backport }"
|
|
||||||
backport_branch=backport-${{ github.event.number }}-to-"${target_branch}"
|
|
||||||
subject="[$target_branch] $(gh pr view --json title -q .title ${{ github.event.number }})"
|
|
||||||
|
|
||||||
git checkout origin/"${target_branch}" -b "${backport_branch}"
|
|
||||||
git cherry-pick -x --mainline 1 ${{ github.event.pull_request.merge_commit_sha }}
|
|
||||||
git commit --amend --message "$subject"
|
|
||||||
git push --set-upstream origin --force-with-lease "${backport_branch}"
|
|
||||||
gh pr create \
|
|
||||||
--base "${target_branch}" \
|
|
||||||
--title "${subject}" \
|
|
||||||
--body "Backport of PR #${{ github.event.number }} to $target_branch branch. PR created by backport workflow."
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
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]+"
|
|
||||||
|
|
||||||
|
|
||||||
# Set permissions at the job level.
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
if: github.repository == 'pytest-dev/pytest'
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 30
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
- 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
|
|
||||||
with:
|
|
||||||
password: ${{ secrets.pypi_token }}
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: "3.7"
|
|
||||||
|
|
||||||
- name: Install tox
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install --upgrade tox
|
|
||||||
|
|
||||||
- name: Publish GitHub release notes
|
|
||||||
env:
|
|
||||||
GH_RELEASE_NOTES_TOKEN: ${{ github.token }}
|
|
||||||
run: |
|
|
||||||
sudo apt-get install pandoc
|
|
||||||
tox -e publish-gh-release-notes
|
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
name: test
|
name: main
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- "[0-9]+.[0-9]+.x"
|
- "[0-9]+.[0-9]+.x"
|
||||||
- "test-me-*"
|
|
||||||
tags:
|
tags:
|
||||||
- "[0-9]+.[0-9]+.[0-9]+"
|
- "[0-9]+.[0-9]+.[0-9]+"
|
||||||
- "[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
|
- "[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
|
||||||
@@ -18,18 +17,13 @@ on:
|
|||||||
env:
|
env:
|
||||||
PYTEST_ADDOPTS: "--color=yes"
|
PYTEST_ADDOPTS: "--color=yes"
|
||||||
|
|
||||||
# Cancel running jobs for the same workflow and branch.
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
# Set permissions at the job level.
|
# Set permissions at the job level.
|
||||||
permissions: {}
|
permissions: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
timeout-minutes: 45
|
timeout-minutes: 30
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
@@ -37,28 +31,24 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
name: [
|
name: [
|
||||||
|
"windows-py36",
|
||||||
"windows-py37",
|
"windows-py37",
|
||||||
"windows-py37-pluggy",
|
"windows-py37-pluggy",
|
||||||
"windows-py38",
|
"windows-py38",
|
||||||
"windows-py39",
|
"windows-py39",
|
||||||
"windows-py310",
|
"windows-py310",
|
||||||
"windows-py311",
|
|
||||||
"windows-py312",
|
|
||||||
|
|
||||||
|
"ubuntu-py36",
|
||||||
"ubuntu-py37",
|
"ubuntu-py37",
|
||||||
"ubuntu-py37-pluggy",
|
"ubuntu-py37-pluggy",
|
||||||
"ubuntu-py37-freeze",
|
"ubuntu-py37-freeze",
|
||||||
"ubuntu-py38",
|
"ubuntu-py38",
|
||||||
"ubuntu-py39",
|
"ubuntu-py39",
|
||||||
"ubuntu-py310",
|
"ubuntu-py310",
|
||||||
"ubuntu-py311",
|
|
||||||
"ubuntu-py312",
|
|
||||||
"ubuntu-pypy3",
|
"ubuntu-pypy3",
|
||||||
|
|
||||||
"macos-py37",
|
"macos-py37",
|
||||||
"macos-py39",
|
"macos-py38",
|
||||||
"macos-py310",
|
|
||||||
"macos-py312",
|
|
||||||
|
|
||||||
"docs",
|
"docs",
|
||||||
"doctesting",
|
"doctesting",
|
||||||
@@ -66,6 +56,10 @@ jobs:
|
|||||||
]
|
]
|
||||||
|
|
||||||
include:
|
include:
|
||||||
|
- name: "windows-py36"
|
||||||
|
python: "3.6"
|
||||||
|
os: windows-latest
|
||||||
|
tox_env: "py36-xdist"
|
||||||
- name: "windows-py37"
|
- name: "windows-py37"
|
||||||
python: "3.7"
|
python: "3.7"
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
@@ -73,7 +67,7 @@ jobs:
|
|||||||
- name: "windows-py37-pluggy"
|
- name: "windows-py37-pluggy"
|
||||||
python: "3.7"
|
python: "3.7"
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
tox_env: "py37-pluggymain-pylib-xdist"
|
tox_env: "py37-pluggymain-xdist"
|
||||||
- name: "windows-py38"
|
- name: "windows-py38"
|
||||||
python: "3.8"
|
python: "3.8"
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
@@ -84,18 +78,14 @@ jobs:
|
|||||||
os: windows-latest
|
os: windows-latest
|
||||||
tox_env: "py39-xdist"
|
tox_env: "py39-xdist"
|
||||||
- name: "windows-py310"
|
- name: "windows-py310"
|
||||||
python: "3.10"
|
python: "3.10-dev"
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
tox_env: "py310-xdist"
|
tox_env: "py310-xdist"
|
||||||
- name: "windows-py311"
|
|
||||||
python: "3.11"
|
|
||||||
os: windows-latest
|
|
||||||
tox_env: "py311"
|
|
||||||
- name: "windows-py312"
|
|
||||||
python: "3.12-dev"
|
|
||||||
os: windows-latest
|
|
||||||
tox_env: "py312"
|
|
||||||
|
|
||||||
|
- name: "ubuntu-py36"
|
||||||
|
python: "3.6"
|
||||||
|
os: ubuntu-latest
|
||||||
|
tox_env: "py36-xdist"
|
||||||
- name: "ubuntu-py37"
|
- name: "ubuntu-py37"
|
||||||
python: "3.7"
|
python: "3.7"
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
@@ -104,7 +94,7 @@ jobs:
|
|||||||
- name: "ubuntu-py37-pluggy"
|
- name: "ubuntu-py37-pluggy"
|
||||||
python: "3.7"
|
python: "3.7"
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
tox_env: "py37-pluggymain-pylib-xdist"
|
tox_env: "py37-pluggymain-xdist"
|
||||||
- name: "ubuntu-py37-freeze"
|
- name: "ubuntu-py37-freeze"
|
||||||
python: "3.7"
|
python: "3.7"
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
@@ -118,19 +108,9 @@ jobs:
|
|||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
tox_env: "py39-xdist"
|
tox_env: "py39-xdist"
|
||||||
- name: "ubuntu-py310"
|
- name: "ubuntu-py310"
|
||||||
python: "3.10"
|
python: "3.10-dev"
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
tox_env: "py310-xdist"
|
tox_env: "py310-xdist"
|
||||||
- name: "ubuntu-py311"
|
|
||||||
python: "3.11"
|
|
||||||
os: ubuntu-latest
|
|
||||||
tox_env: "py311"
|
|
||||||
use_coverage: true
|
|
||||||
- name: "ubuntu-py312"
|
|
||||||
python: "3.12-dev"
|
|
||||||
os: ubuntu-latest
|
|
||||||
tox_env: "py312"
|
|
||||||
use_coverage: true
|
|
||||||
- name: "ubuntu-pypy3"
|
- name: "ubuntu-pypy3"
|
||||||
python: "pypy-3.7"
|
python: "pypy-3.7"
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
@@ -140,22 +120,14 @@ jobs:
|
|||||||
python: "3.7"
|
python: "3.7"
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
tox_env: "py37-xdist"
|
tox_env: "py37-xdist"
|
||||||
- name: "macos-py39"
|
- name: "macos-py38"
|
||||||
python: "3.9"
|
python: "3.8"
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
tox_env: "py39-xdist"
|
tox_env: "py38-xdist"
|
||||||
use_coverage: true
|
use_coverage: true
|
||||||
- name: "macos-py310"
|
|
||||||
python: "3.10"
|
|
||||||
os: macos-latest
|
|
||||||
tox_env: "py310-xdist"
|
|
||||||
- name: "macos-py312"
|
|
||||||
python: "3.12-dev"
|
|
||||||
os: macos-latest
|
|
||||||
tox_env: "py312-xdist"
|
|
||||||
|
|
||||||
- name: "plugins"
|
- name: "plugins"
|
||||||
python: "3.9"
|
python: "3.7"
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
tox_env: "plugins"
|
tox_env: "plugins"
|
||||||
|
|
||||||
@@ -170,16 +142,15 @@ jobs:
|
|||||||
use_coverage: true
|
use_coverage: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python }}
|
- name: Set up Python ${{ matrix.python }}
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python }}
|
python-version: ${{ matrix.python }}
|
||||||
check-latest: ${{ endsWith(matrix.python, '-dev') }}
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
@@ -200,16 +171,51 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
if: "matrix.use_coverage"
|
if: "matrix.use_coverage"
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v2
|
||||||
continue-on-error: true
|
|
||||||
with:
|
with:
|
||||||
fail_ci_if_error: true
|
fail_ci_if_error: true
|
||||||
files: ./coverage.xml
|
files: ./coverage.xml
|
||||||
verbose: true
|
verbose: true
|
||||||
|
|
||||||
check-package:
|
deploy:
|
||||||
|
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'pytest-dev/pytest'
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 30
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
needs: [build]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
- name: Build and Check Package
|
with:
|
||||||
uses: hynek/build-and-inspect-python-package@v1.5
|
fetch-depth: 0
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: "3.7"
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install --upgrade build tox
|
||||||
|
|
||||||
|
- name: Build package
|
||||||
|
run: |
|
||||||
|
python -m build
|
||||||
|
|
||||||
|
- name: Publish package to PyPI
|
||||||
|
uses: pypa/gh-action-pypi-publish@master
|
||||||
|
with:
|
||||||
|
user: __token__
|
||||||
|
password: ${{ secrets.pypi_token }}
|
||||||
|
|
||||||
|
- name: Publish GitHub release notes
|
||||||
|
env:
|
||||||
|
GH_RELEASE_NOTES_TOKEN: ${{ github.token }}
|
||||||
|
run: |
|
||||||
|
sudo apt-get install pandoc
|
||||||
|
tox -e publish-gh-release-notes
|
||||||
@@ -27,12 +27,12 @@ jobs:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: "3.8"
|
python-version: "3.8"
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
name: close needs-information issues
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: "30 1 * * *"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
close-issues:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
issues: write
|
|
||||||
steps:
|
|
||||||
- uses: actions/stale@v8
|
|
||||||
with:
|
|
||||||
debug-only: false
|
|
||||||
days-before-issue-stale: 14
|
|
||||||
days-before-issue-close: 7
|
|
||||||
only-labels: "status: needs information"
|
|
||||||
stale-issue-label: "stale"
|
|
||||||
stale-issue-message: "This issue is stale because it has been open for 14 days with no activity."
|
|
||||||
close-issue-message: "This issue was closed because it has been inactive for 7 days since being marked as stale."
|
|
||||||
days-before-pr-stale: -1
|
|
||||||
days-before-pr-close: -1
|
|
||||||
@@ -11,8 +11,7 @@ on:
|
|||||||
permissions: {}
|
permissions: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-plugin-list:
|
createPullRequest:
|
||||||
if: github.repository_owner == 'pytest-dev'
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -20,12 +19,12 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: 3.8
|
python-version: 3.8
|
||||||
|
|
||||||
@@ -38,7 +37,7 @@ jobs:
|
|||||||
run: python scripts/update-plugin-list.py
|
run: python scripts/update-plugin-list.py
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@5b4a9f6a9e2af26e5f02351490b90d01eb8ec1e5
|
uses: peter-evans/create-pull-request@2455e1596942c2902952003bbb574afbbe2ab2e6
|
||||||
with:
|
with:
|
||||||
commit-message: '[automated] Update plugin list'
|
commit-message: '[automated] Update plugin list'
|
||||||
author: 'pytest bot <pytestbot@users.noreply.github.com>'
|
author: 'pytest bot <pytestbot@users.noreply.github.com>'
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ coverage.xml
|
|||||||
.project
|
.project
|
||||||
.settings
|
.settings
|
||||||
.vscode
|
.vscode
|
||||||
__pycache__/
|
|
||||||
|
|
||||||
# generated by pip
|
# generated by pip
|
||||||
pip-wheel-metadata/
|
pip-wheel-metadata/
|
||||||
|
|||||||
+18
-27
@@ -1,16 +1,16 @@
|
|||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 23.3.0
|
rev: 21.10b0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
args: [--safe, --quiet]
|
args: [--safe, --quiet]
|
||||||
- repo: https://github.com/asottile/blacken-docs
|
- repo: https://github.com/asottile/blacken-docs
|
||||||
rev: 1.13.0
|
rev: v1.11.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: blacken-docs
|
- id: blacken-docs
|
||||||
additional_dependencies: [black==23.1.0]
|
additional_dependencies: [black==20.8b1]
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v4.4.0
|
rev: v4.0.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
@@ -20,56 +20,47 @@ repos:
|
|||||||
- id: debug-statements
|
- id: debug-statements
|
||||||
exclude: _pytest/(debugging|hookspec).py
|
exclude: _pytest/(debugging|hookspec).py
|
||||||
language_version: python3
|
language_version: python3
|
||||||
- repo: https://github.com/PyCQA/autoflake
|
|
||||||
rev: v2.1.1
|
|
||||||
hooks:
|
|
||||||
- id: autoflake
|
|
||||||
name: autoflake
|
|
||||||
args: ["--in-place", "--remove-unused-variables", "--remove-all-unused-imports"]
|
|
||||||
language: python
|
|
||||||
files: \.py$
|
|
||||||
- repo: https://github.com/PyCQA/flake8
|
- repo: https://github.com/PyCQA/flake8
|
||||||
rev: 6.0.0
|
rev: 4.0.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: flake8
|
- id: flake8
|
||||||
language_version: python3
|
language_version: python3
|
||||||
additional_dependencies:
|
additional_dependencies:
|
||||||
- flake8-typing-imports==1.12.0
|
- flake8-typing-imports==1.9.0
|
||||||
- flake8-docstrings==1.5.0
|
- flake8-docstrings==1.5.0
|
||||||
- repo: https://github.com/asottile/reorder-python-imports
|
- repo: https://github.com/asottile/reorder_python_imports
|
||||||
rev: v3.9.0
|
rev: v2.6.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: reorder-python-imports
|
- id: reorder-python-imports
|
||||||
args: ['--application-directories=.:src', --py37-plus]
|
args: ['--application-directories=.:src', --py36-plus]
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
rev: v3.4.0
|
rev: v2.29.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
args: [--py37-plus]
|
args: [--py36-plus]
|
||||||
- repo: https://github.com/asottile/setup-cfg-fmt
|
- repo: https://github.com/asottile/setup-cfg-fmt
|
||||||
rev: v2.3.0
|
rev: v1.19.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: setup-cfg-fmt
|
- id: setup-cfg-fmt
|
||||||
args: ["--max-py-version=3.12", "--include-version-classifiers"]
|
args: [--max-py-version=3.10]
|
||||||
- repo: https://github.com/pre-commit/pygrep-hooks
|
- repo: https://github.com/pre-commit/pygrep-hooks
|
||||||
rev: v1.10.0
|
rev: v1.9.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: python-use-type-annotations
|
- id: python-use-type-annotations
|
||||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||||
rev: v1.3.0
|
rev: v0.910-1
|
||||||
hooks:
|
hooks:
|
||||||
- id: mypy
|
- id: mypy
|
||||||
files: ^(src/|testing/)
|
files: ^(src/|testing/)
|
||||||
args: []
|
args: []
|
||||||
additional_dependencies:
|
additional_dependencies:
|
||||||
- iniconfig>=1.1.0
|
- iniconfig>=1.1.0
|
||||||
|
- py>=1.8.2
|
||||||
- attrs>=19.2.0
|
- attrs>=19.2.0
|
||||||
- packaging
|
- packaging
|
||||||
- tomli
|
- tomli
|
||||||
|
- types-atomicwrites
|
||||||
- types-pkg_resources
|
- types-pkg_resources
|
||||||
# for mypy running on python>=3.11 since exceptiongroup is only a dependency
|
|
||||||
# on <3.11
|
|
||||||
- exceptiongroup>=1.0.0rc8
|
|
||||||
- repo: local
|
- repo: local
|
||||||
hooks:
|
hooks:
|
||||||
- id: rst
|
- id: rst
|
||||||
@@ -102,7 +93,7 @@ repos:
|
|||||||
types: [python]
|
types: [python]
|
||||||
- id: py-path-deprecated
|
- id: py-path-deprecated
|
||||||
name: py.path usage is deprecated
|
name: py.path usage is deprecated
|
||||||
exclude: docs|src/_pytest/deprecated.py|testing/deprecated_test.py|src/_pytest/legacypath.py
|
exclude: docs|src/_pytest/deprecated.py|testing/deprecated_test.py
|
||||||
language: pygrep
|
language: pygrep
|
||||||
entry: \bpy\.path\.local
|
entry: \bpy\.path\.local
|
||||||
types: [python]
|
types: [python]
|
||||||
|
|||||||
+3
-7
@@ -2,12 +2,9 @@ version: 2
|
|||||||
|
|
||||||
python:
|
python:
|
||||||
install:
|
install:
|
||||||
# Install pytest first, then doc/en/requirements.txt.
|
- requirements: doc/en/requirements.txt
|
||||||
# This order is important to honor any pins in doc/en/requirements.txt
|
- method: pip
|
||||||
# when the pinned library is also a dependency of pytest.
|
path: .
|
||||||
- method: pip
|
|
||||||
path: .
|
|
||||||
- requirements: doc/en/requirements.txt
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
@@ -19,4 +16,3 @@ build:
|
|||||||
formats:
|
formats:
|
||||||
- epub
|
- epub
|
||||||
- pdf
|
- pdf
|
||||||
- htmlzip
|
|
||||||
|
|||||||
@@ -8,18 +8,13 @@ Abdeali JK
|
|||||||
Abdelrahman Elbehery
|
Abdelrahman Elbehery
|
||||||
Abhijeet Kasurde
|
Abhijeet Kasurde
|
||||||
Adam Johnson
|
Adam Johnson
|
||||||
Adam Stewart
|
|
||||||
Adam Uhlir
|
Adam Uhlir
|
||||||
Ahn Ki-Wook
|
Ahn Ki-Wook
|
||||||
Akiomi Kamakura
|
Akiomi Kamakura
|
||||||
Alan Velasco
|
Alan Velasco
|
||||||
Alessio Izzo
|
|
||||||
Alex Jones
|
|
||||||
Alex Lambson
|
|
||||||
Alexander Johnson
|
Alexander Johnson
|
||||||
Alexander King
|
Alexander King
|
||||||
Alexei Kozlenok
|
Alexei Kozlenok
|
||||||
Alice Purcell
|
|
||||||
Allan Feldman
|
Allan Feldman
|
||||||
Aly Sivji
|
Aly Sivji
|
||||||
Amir Elkess
|
Amir Elkess
|
||||||
@@ -47,10 +42,8 @@ Ariel Pillemer
|
|||||||
Armin Rigo
|
Armin Rigo
|
||||||
Aron Coyle
|
Aron Coyle
|
||||||
Aron Curzon
|
Aron Curzon
|
||||||
Ashish Kurmi
|
|
||||||
Aviral Verma
|
Aviral Verma
|
||||||
Aviv Palivoda
|
Aviv Palivoda
|
||||||
Babak Keyvani
|
|
||||||
Barney Gale
|
Barney Gale
|
||||||
Ben Gartner
|
Ben Gartner
|
||||||
Ben Webb
|
Ben Webb
|
||||||
@@ -58,12 +51,10 @@ Benjamin Peterson
|
|||||||
Bernard Pratz
|
Bernard Pratz
|
||||||
Bob Ippolito
|
Bob Ippolito
|
||||||
Brian Dorsey
|
Brian Dorsey
|
||||||
Brian Larsen
|
|
||||||
Brian Maissy
|
Brian Maissy
|
||||||
Brian Okken
|
Brian Okken
|
||||||
Brianna Laugher
|
Brianna Laugher
|
||||||
Bruno Oliveira
|
Bruno Oliveira
|
||||||
Cal Jacobson
|
|
||||||
Cal Leeming
|
Cal Leeming
|
||||||
Carl Friedrich Bolz
|
Carl Friedrich Bolz
|
||||||
Carlos Jenkins
|
Carlos Jenkins
|
||||||
@@ -71,12 +62,9 @@ Ceridwen
|
|||||||
Charles Cloud
|
Charles Cloud
|
||||||
Charles Machalow
|
Charles Machalow
|
||||||
Charnjit SiNGH (CCSJ)
|
Charnjit SiNGH (CCSJ)
|
||||||
Cheuk Ting Ho
|
|
||||||
Chris Mahoney
|
|
||||||
Chris Lamb
|
Chris Lamb
|
||||||
Chris NeJame
|
Chris NeJame
|
||||||
Chris Rose
|
Chris Rose
|
||||||
Chris Wheeler
|
|
||||||
Christian Boelsen
|
Christian Boelsen
|
||||||
Christian Fetzer
|
Christian Fetzer
|
||||||
Christian Neumüller
|
Christian Neumüller
|
||||||
@@ -95,8 +83,6 @@ Damian Skrzypczak
|
|||||||
Daniel Grana
|
Daniel Grana
|
||||||
Daniel Hahler
|
Daniel Hahler
|
||||||
Daniel Nuri
|
Daniel Nuri
|
||||||
Daniel Sánchez Castelló
|
|
||||||
Daniel Valenzuela Zenteno
|
|
||||||
Daniel Wandschneider
|
Daniel Wandschneider
|
||||||
Daniele Procida
|
Daniele Procida
|
||||||
Danielle Jenkins
|
Danielle Jenkins
|
||||||
@@ -131,22 +117,18 @@ Eric Siegerman
|
|||||||
Erik Aronesty
|
Erik Aronesty
|
||||||
Erik M. Bray
|
Erik M. Bray
|
||||||
Evan Kepner
|
Evan Kepner
|
||||||
Evgeny Seliverstov
|
|
||||||
Fabien Zarifian
|
Fabien Zarifian
|
||||||
Fabio Zadrozny
|
Fabio Zadrozny
|
||||||
Felix Hofstätter
|
|
||||||
Felix Nieuwenhuizen
|
Felix Nieuwenhuizen
|
||||||
Feng Ma
|
Feng Ma
|
||||||
Florian Bruhin
|
Florian Bruhin
|
||||||
Florian Dahlitz
|
Florian Dahlitz
|
||||||
Floris Bruynooghe
|
Floris Bruynooghe
|
||||||
Gabriel Landau
|
|
||||||
Gabriel Reis
|
Gabriel Reis
|
||||||
Garvit Shubham
|
Garvit Shubham
|
||||||
Gene Wood
|
Gene Wood
|
||||||
George Kussumoto
|
George Kussumoto
|
||||||
Georgy Dyuldin
|
Georgy Dyuldin
|
||||||
Gergely Kalmár
|
|
||||||
Gleb Nikonorov
|
Gleb Nikonorov
|
||||||
Graeme Smecher
|
Graeme Smecher
|
||||||
Graham Horler
|
Graham Horler
|
||||||
@@ -166,10 +148,8 @@ Ian Bicking
|
|||||||
Ian Lesperance
|
Ian Lesperance
|
||||||
Ilya Konstantinov
|
Ilya Konstantinov
|
||||||
Ionuț Turturică
|
Ionuț Turturică
|
||||||
Itxaso Aizpurua
|
|
||||||
Iwan Briquemont
|
Iwan Briquemont
|
||||||
Jaap Broekhuizen
|
Jaap Broekhuizen
|
||||||
Jake VanderPlas
|
|
||||||
Jakob van Santen
|
Jakob van Santen
|
||||||
Jakub Mitoraj
|
Jakub Mitoraj
|
||||||
James Bourbeau
|
James Bourbeau
|
||||||
@@ -182,9 +162,7 @@ Jeff Rackauckas
|
|||||||
Jeff Widman
|
Jeff Widman
|
||||||
Jenni Rinker
|
Jenni Rinker
|
||||||
John Eddie Ayson
|
John Eddie Ayson
|
||||||
John Litborn
|
|
||||||
John Towler
|
John Towler
|
||||||
Jon Parise
|
|
||||||
Jon Sonesen
|
Jon Sonesen
|
||||||
Jonas Obrist
|
Jonas Obrist
|
||||||
Jordan Guymon
|
Jordan Guymon
|
||||||
@@ -194,25 +172,19 @@ Joseph Hunkeler
|
|||||||
Josh Karpel
|
Josh Karpel
|
||||||
Joshua Bronson
|
Joshua Bronson
|
||||||
Jurko Gospodnetić
|
Jurko Gospodnetić
|
||||||
Justice Ndou
|
|
||||||
Justyna Janczyszyn
|
Justyna Janczyszyn
|
||||||
|
Justice Ndou
|
||||||
Kale Kundert
|
Kale Kundert
|
||||||
Kamran Ahmad
|
Kamran Ahmad
|
||||||
Kenny Y
|
|
||||||
Karl O. Pinc
|
Karl O. Pinc
|
||||||
Karthikeyan Singaravelan
|
Karthikeyan Singaravelan
|
||||||
Katarzyna Jachim
|
Katarzyna Jachim
|
||||||
Katarzyna Król
|
Katarzyna Król
|
||||||
Katerina Koukiou
|
Katerina Koukiou
|
||||||
Keri Volans
|
Keri Volans
|
||||||
Kevin C
|
|
||||||
Kevin Cox
|
Kevin Cox
|
||||||
Kevin Hierro Carrasco
|
|
||||||
Kevin J. Foley
|
Kevin J. Foley
|
||||||
Kian Eliasi
|
|
||||||
Kian-Meng Ang
|
|
||||||
Kodi B. Arfer
|
Kodi B. Arfer
|
||||||
Kojo Idrissa
|
|
||||||
Kostis Anagnostopoulos
|
Kostis Anagnostopoulos
|
||||||
Kristoffer Nordström
|
Kristoffer Nordström
|
||||||
Kyle Altendorf
|
Kyle Altendorf
|
||||||
@@ -235,7 +207,6 @@ Marcin Bachry
|
|||||||
Marco Gorelli
|
Marco Gorelli
|
||||||
Mark Abramowitz
|
Mark Abramowitz
|
||||||
Mark Dickinson
|
Mark Dickinson
|
||||||
Marko Pacak
|
|
||||||
Markus Unterwaditzer
|
Markus Unterwaditzer
|
||||||
Martijn Faassen
|
Martijn Faassen
|
||||||
Martin Altmayer
|
Martin Altmayer
|
||||||
@@ -249,6 +220,7 @@ Matthias Hafner
|
|||||||
Maxim Filipenko
|
Maxim Filipenko
|
||||||
Maximilian Cosmo Sitter
|
Maximilian Cosmo Sitter
|
||||||
mbyt
|
mbyt
|
||||||
|
Mickey Pashov
|
||||||
Michael Aquilina
|
Michael Aquilina
|
||||||
Michael Birtwell
|
Michael Birtwell
|
||||||
Michael Droettboom
|
Michael Droettboom
|
||||||
@@ -257,7 +229,6 @@ Michael Krebs
|
|||||||
Michael Seifert
|
Michael Seifert
|
||||||
Michal Wajszczuk
|
Michal Wajszczuk
|
||||||
Michał Zięba
|
Michał Zięba
|
||||||
Mickey Pashov
|
|
||||||
Mihai Capotă
|
Mihai Capotă
|
||||||
Mike Hoyle (hoylemd)
|
Mike Hoyle (hoylemd)
|
||||||
Mike Lundy
|
Mike Lundy
|
||||||
@@ -271,10 +242,9 @@ Nicholas Murphy
|
|||||||
Niclas Olofsson
|
Niclas Olofsson
|
||||||
Nicolas Delaby
|
Nicolas Delaby
|
||||||
Nikolay Kondratyev
|
Nikolay Kondratyev
|
||||||
Nipunn Koorapati
|
Olga Matoula
|
||||||
Oleg Pidsadnyi
|
Oleg Pidsadnyi
|
||||||
Oleg Sushchenko
|
Oleg Sushchenko
|
||||||
Olga Matoula
|
|
||||||
Oliver Bestwalter
|
Oliver Bestwalter
|
||||||
Omar Kohl
|
Omar Kohl
|
||||||
Omer Hadari
|
Omer Hadari
|
||||||
@@ -282,15 +252,12 @@ Ondřej Súkup
|
|||||||
Oscar Benjamin
|
Oscar Benjamin
|
||||||
Parth Patel
|
Parth Patel
|
||||||
Patrick Hayes
|
Patrick Hayes
|
||||||
Paul Müller
|
|
||||||
Paul Reece
|
|
||||||
Pauli Virtanen
|
Pauli Virtanen
|
||||||
Pavel Karateev
|
Pavel Karateev
|
||||||
Paweł Adamczak
|
Paweł Adamczak
|
||||||
Pedro Algarvio
|
Pedro Algarvio
|
||||||
Petter Strandmark
|
Petter Strandmark
|
||||||
Philipp Loose
|
Philipp Loose
|
||||||
Pierre Sassoulas
|
|
||||||
Pieter Mulder
|
Pieter Mulder
|
||||||
Piotr Banaszkiewicz
|
Piotr Banaszkiewicz
|
||||||
Piotr Helm
|
Piotr Helm
|
||||||
@@ -300,18 +267,15 @@ Prashant Sharma
|
|||||||
Pulkit Goyal
|
Pulkit Goyal
|
||||||
Punyashloka Biswal
|
Punyashloka Biswal
|
||||||
Quentin Pradet
|
Quentin Pradet
|
||||||
q0w
|
|
||||||
Ralf Schmitt
|
Ralf Schmitt
|
||||||
Ralph Giles
|
|
||||||
Ram Rachum
|
Ram Rachum
|
||||||
|
Ralph Giles
|
||||||
Ran Benita
|
Ran Benita
|
||||||
Raphael Castaneda
|
Raphael Castaneda
|
||||||
Raphael Pierzina
|
Raphael Pierzina
|
||||||
Rafal Semik
|
|
||||||
Raquel Alegre
|
Raquel Alegre
|
||||||
Ravi Chandra
|
Ravi Chandra
|
||||||
Robert Holt
|
Robert Holt
|
||||||
Roberto Aldera
|
|
||||||
Roberto Polli
|
Roberto Polli
|
||||||
Roland Puntaier
|
Roland Puntaier
|
||||||
Romain Dorgueil
|
Romain Dorgueil
|
||||||
@@ -322,27 +286,23 @@ Ruaridh Williamson
|
|||||||
Russel Winder
|
Russel Winder
|
||||||
Ryan Wooden
|
Ryan Wooden
|
||||||
Saiprasad Kale
|
Saiprasad Kale
|
||||||
Samuel Colvin
|
|
||||||
Samuel Dion-Girardeau
|
Samuel Dion-Girardeau
|
||||||
Samuel Searles-Bryant
|
Samuel Searles-Bryant
|
||||||
Samuele Pedroni
|
Samuele Pedroni
|
||||||
Sanket Duthade
|
Sanket Duthade
|
||||||
Sankt Petersbug
|
Sankt Petersbug
|
||||||
Saravanan Padmanaban
|
|
||||||
Segev Finer
|
Segev Finer
|
||||||
Serhii Mozghovyi
|
Serhii Mozghovyi
|
||||||
Seth Junot
|
Seth Junot
|
||||||
Shantanu Jain
|
Shantanu Jain
|
||||||
Shubham Adep
|
Shubham Adep
|
||||||
Simon Gomizelj
|
Simon Gomizelj
|
||||||
Simon Holesch
|
|
||||||
Simon Kerr
|
Simon Kerr
|
||||||
Skylar Downes
|
Skylar Downes
|
||||||
Srinivas Reddy Thatiparthy
|
Srinivas Reddy Thatiparthy
|
||||||
Stefan Farmbauer
|
Stefan Farmbauer
|
||||||
Stefan Scherfke
|
Stefan Scherfke
|
||||||
Stefan Zimmermann
|
Stefan Zimmermann
|
||||||
Stefanie Molin
|
|
||||||
Stefano Taschini
|
Stefano Taschini
|
||||||
Steffen Allner
|
Steffen Allner
|
||||||
Stephan Obermann
|
Stephan Obermann
|
||||||
@@ -354,32 +314,26 @@ Taneli Hukkinen
|
|||||||
Tanvi Mehta
|
Tanvi Mehta
|
||||||
Tarcisio Fischer
|
Tarcisio Fischer
|
||||||
Tareq Alayan
|
Tareq Alayan
|
||||||
Tatiana Ovary
|
|
||||||
Ted Xiao
|
Ted Xiao
|
||||||
Terje Runde
|
Terje Runde
|
||||||
Thomas Grainger
|
Thomas Grainger
|
||||||
Thomas Hisch
|
Thomas Hisch
|
||||||
Tim Hoffmann
|
Tim Hoffmann
|
||||||
Tim Strazny
|
Tim Strazny
|
||||||
TJ Bruno
|
|
||||||
Tobias Diez
|
|
||||||
Tom Dalton
|
Tom Dalton
|
||||||
Tom Viner
|
Tom Viner
|
||||||
Tomáš Gavenčiak
|
Tomáš Gavenčiak
|
||||||
Tomer Keren
|
Tomer Keren
|
||||||
Tony Narlock
|
|
||||||
Tor Colvin
|
Tor Colvin
|
||||||
Trevor Bekolay
|
Trevor Bekolay
|
||||||
Tyler Goodlet
|
Tyler Goodlet
|
||||||
Tzu-ping Chung
|
Tzu-ping Chung
|
||||||
Vasily Kuznetsov
|
Vasily Kuznetsov
|
||||||
Victor Maryama
|
Victor Maryama
|
||||||
Victor Rodriguez
|
|
||||||
Victor Uriarte
|
Victor Uriarte
|
||||||
Vidar T. Fauske
|
Vidar T. Fauske
|
||||||
Virgil Dupras
|
Virgil Dupras
|
||||||
Vitaly Lashmanov
|
Vitaly Lashmanov
|
||||||
Vivaan Verma
|
|
||||||
Vlad Dragos
|
Vlad Dragos
|
||||||
Vlad Radziuk
|
Vlad Radziuk
|
||||||
Vladyslav Rachek
|
Vladyslav Rachek
|
||||||
@@ -392,14 +346,8 @@ Wouter van Ackooy
|
|||||||
Xixi Zhao
|
Xixi Zhao
|
||||||
Xuan Luong
|
Xuan Luong
|
||||||
Xuecong Liao
|
Xuecong Liao
|
||||||
Yannick Péroux
|
|
||||||
Yoav Caspi
|
Yoav Caspi
|
||||||
Yuliang Shao
|
|
||||||
Yusuke Kadowaki
|
|
||||||
Yuval Shimon
|
|
||||||
Zac Hatfield-Dodds
|
Zac Hatfield-Dodds
|
||||||
Zachary Kneupper
|
Zachary Kneupper
|
||||||
Zachary OBrien
|
|
||||||
Zhouxin Qiu
|
|
||||||
Zoltán Máté
|
Zoltán Máté
|
||||||
Zsolt Cserna
|
Zsolt Cserna
|
||||||
|
|||||||
+3
-17
@@ -50,8 +50,6 @@ Fix bugs
|
|||||||
--------
|
--------
|
||||||
|
|
||||||
Look through the `GitHub issues for bugs <https://github.com/pytest-dev/pytest/labels/type:%20bug>`_.
|
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>`_
|
|
||||||
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
|
:ref:`Talk <contact>` to developers to find out how you can fix specific bugs. To indicate that you are going
|
||||||
to work on a particular issue, add a comment to that effect on the specific issue.
|
to work on a particular issue, add a comment to that effect on the specific issue.
|
||||||
@@ -223,7 +221,7 @@ changes you want to review and merge. Pull requests are stored on
|
|||||||
Once you send a pull request, we can discuss its potential modifications and
|
Once you send a pull request, we can discuss its potential modifications and
|
||||||
even add more commits to it later on. There's an excellent tutorial on how Pull
|
even add more commits to it later on. There's an excellent tutorial on how Pull
|
||||||
Requests work in the
|
Requests work in the
|
||||||
`GitHub Help Center <https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests>`_.
|
`GitHub Help Center <https://help.github.com/articles/using-pull-requests/>`_.
|
||||||
|
|
||||||
Here is a simple overview, with pytest-specific bits:
|
Here is a simple overview, with pytest-specific bits:
|
||||||
|
|
||||||
@@ -244,11 +242,6 @@ Here is a simple overview, with pytest-specific bits:
|
|||||||
be released in micro releases whereas features will be released in
|
be released in micro releases whereas features will be released in
|
||||||
minor releases and incompatible changes in major releases.
|
minor releases and incompatible changes in major releases.
|
||||||
|
|
||||||
You will need the tags to test locally, so be sure you have the tags from the main repository. If you suspect you don't, set the main repository as upstream and fetch the tags::
|
|
||||||
|
|
||||||
$ git remote add upstream https://github.com/pytest-dev/pytest
|
|
||||||
$ git fetch upstream --tags
|
|
||||||
|
|
||||||
If you need some help with Git, follow this quick start
|
If you need some help with Git, follow this quick start
|
||||||
guide: https://git.wiki.kernel.org/index.php/QuickStart
|
guide: https://git.wiki.kernel.org/index.php/QuickStart
|
||||||
|
|
||||||
@@ -385,7 +378,7 @@ them.
|
|||||||
Backporting bug fixes for the next patch release
|
Backporting bug fixes for the next patch release
|
||||||
------------------------------------------------
|
------------------------------------------------
|
||||||
|
|
||||||
Pytest makes a feature release every few weeks or months. In between, patch releases
|
Pytest makes feature release every few weeks or months. In between, patch releases
|
||||||
are made to the previous feature release, containing bug fixes only. The bug fixes
|
are made to the previous feature release, containing bug fixes only. The bug fixes
|
||||||
usually fix regressions, but may be any change that should reach users before the
|
usually fix regressions, but may be any change that should reach users before the
|
||||||
next feature release.
|
next feature release.
|
||||||
@@ -394,17 +387,10 @@ Suppose for example that the latest release was 1.2.3, and you want to include
|
|||||||
a bug fix in 1.2.4 (check https://github.com/pytest-dev/pytest/releases for the
|
a bug fix in 1.2.4 (check https://github.com/pytest-dev/pytest/releases for the
|
||||||
actual latest release). The procedure for this is:
|
actual latest release). The procedure for this is:
|
||||||
|
|
||||||
#. First, make sure the bug is fixed in the ``main`` branch, with a regular pull
|
#. First, make sure the bug is fixed the ``main`` branch, with a regular pull
|
||||||
request, as described above. An exception to this is if the bug fix is not
|
request, as described above. An exception to this is if the bug fix is not
|
||||||
applicable to ``main`` anymore.
|
applicable to ``main`` anymore.
|
||||||
|
|
||||||
Automatic method:
|
|
||||||
|
|
||||||
Add a ``backport 1.2.x`` label to the PR you want to backport. This will create
|
|
||||||
a backport PR against the ``1.2.x`` branch.
|
|
||||||
|
|
||||||
Manual method:
|
|
||||||
|
|
||||||
#. ``git checkout origin/1.2.x -b backport-XXXX`` # use the main PR number here
|
#. ``git checkout origin/1.2.x -b backport-XXXX`` # use the main PR number here
|
||||||
|
|
||||||
#. Locate the merge commit on the PR, in the *merged* message, for example:
|
#. Locate the merge commit on the PR, in the *merged* message, for example:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2004 Holger Krekel and others
|
Copyright (c) 2004-2021 Holger Krekel and others
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
|||||||
+5
-5
@@ -20,8 +20,8 @@
|
|||||||
:target: https://codecov.io/gh/pytest-dev/pytest
|
:target: https://codecov.io/gh/pytest-dev/pytest
|
||||||
:alt: Code coverage Status
|
:alt: Code coverage Status
|
||||||
|
|
||||||
.. image:: https://github.com/pytest-dev/pytest/workflows/test/badge.svg
|
.. image:: https://github.com/pytest-dev/pytest/workflows/main/badge.svg
|
||||||
:target: https://github.com/pytest-dev/pytest/actions?query=workflow%3Atest
|
:target: https://github.com/pytest-dev/pytest/actions?query=workflow%3Amain
|
||||||
|
|
||||||
.. image:: https://results.pre-commit.ci/badge/github/pytest-dev/pytest/main.svg
|
.. image:: https://results.pre-commit.ci/badge/github/pytest-dev/pytest/main.svg
|
||||||
:target: https://results.pre-commit.ci/latest/github/pytest-dev/pytest/main
|
:target: https://results.pre-commit.ci/latest/github/pytest-dev/pytest/main
|
||||||
@@ -88,7 +88,7 @@ Due to ``pytest``'s detailed assertion introspection, only plain ``assert`` stat
|
|||||||
Features
|
Features
|
||||||
--------
|
--------
|
||||||
|
|
||||||
- Detailed info on failing `assert statements <https://docs.pytest.org/en/stable/how-to/assert.html>`_ (no need to remember ``self.assert*`` names)
|
- Detailed info on failing `assert statements <https://docs.pytest.org/en/stable/assert.html>`_ (no need to remember ``self.assert*`` names)
|
||||||
|
|
||||||
- `Auto-discovery
|
- `Auto-discovery
|
||||||
<https://docs.pytest.org/en/stable/explanation/goodpractices.html#python-test-discovery>`_
|
<https://docs.pytest.org/en/stable/explanation/goodpractices.html#python-test-discovery>`_
|
||||||
@@ -100,7 +100,7 @@ Features
|
|||||||
- Can run `unittest <https://docs.pytest.org/en/stable/how-to/unittest.html>`_ (or trial),
|
- Can run `unittest <https://docs.pytest.org/en/stable/how-to/unittest.html>`_ (or trial),
|
||||||
`nose <https://docs.pytest.org/en/stable/how-to/nose.html>`_ test suites out of the box
|
`nose <https://docs.pytest.org/en/stable/how-to/nose.html>`_ test suites out of the box
|
||||||
|
|
||||||
- Python 3.7+ or PyPy3
|
- Python 3.6+ and PyPy3
|
||||||
|
|
||||||
- Rich plugin architecture, with over 850+ `external plugins <https://docs.pytest.org/en/latest/reference/plugin_list.html>`_ and thriving community
|
- Rich plugin architecture, with over 850+ `external plugins <https://docs.pytest.org/en/latest/reference/plugin_list.html>`_ and thriving community
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ Tidelift will coordinate the fix and disclosure.
|
|||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
|
|
||||||
Copyright Holger Krekel and others, 2004.
|
Copyright Holger Krekel and others, 2004-2021.
|
||||||
|
|
||||||
Distributed under the terms of the `MIT`_ license, pytest is free and open source software.
|
Distributed under the terms of the `MIT`_ license, pytest is free and open source software.
|
||||||
|
|
||||||
|
|||||||
+8
-10
@@ -37,7 +37,7 @@ breaking changes or new features.
|
|||||||
|
|
||||||
For a new minor release, first create a new maintenance branch from ``main``::
|
For a new minor release, first create a new maintenance branch from ``main``::
|
||||||
|
|
||||||
git fetch upstream
|
git fetch --all
|
||||||
git branch 7.1.x upstream/main
|
git branch 7.1.x upstream/main
|
||||||
git push upstream 7.1.x
|
git push upstream 7.1.x
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ Major releases
|
|||||||
|
|
||||||
1. Create a new maintenance branch from ``main``::
|
1. Create a new maintenance branch from ``main``::
|
||||||
|
|
||||||
git fetch upstream
|
git fetch --all
|
||||||
git branch 8.0.x upstream/main
|
git branch 8.0.x upstream/main
|
||||||
git push upstream 8.0.x
|
git push upstream 8.0.x
|
||||||
|
|
||||||
@@ -136,31 +136,29 @@ Both automatic and manual processes described above follow the same steps from t
|
|||||||
#. After all tests pass and the PR has been approved, tag the release commit
|
#. 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::
|
in the ``release-MAJOR.MINOR.PATCH`` branch and push it. This will publish to PyPI::
|
||||||
|
|
||||||
git fetch upstream
|
git fetch --all
|
||||||
git tag MAJOR.MINOR.PATCH upstream/release-MAJOR.MINOR.PATCH
|
git tag MAJOR.MINOR.PATCH upstream/release-MAJOR.MINOR.PATCH
|
||||||
git push upstream MAJOR.MINOR.PATCH
|
git push git@github.com:pytest-dev/pytest.git MAJOR.MINOR.PATCH
|
||||||
|
|
||||||
Wait for the deploy to complete, then make sure it is `available on PyPI <https://pypi.org/project/pytest>`_.
|
Wait for the deploy to complete, then make sure it is `available on PyPI <https://pypi.org/project/pytest>`_.
|
||||||
|
|
||||||
#. Merge the PR. **Make sure it's not squash-merged**, so that the tagged commit ends up in the main branch.
|
#. Merge the PR.
|
||||||
|
|
||||||
#. Cherry-pick the CHANGELOG / announce files to the ``main`` branch::
|
#. Cherry-pick the CHANGELOG / announce files to the ``main`` branch::
|
||||||
|
|
||||||
git fetch upstream
|
git fetch --all --prune
|
||||||
git checkout upstream/main -b cherry-pick-release
|
git checkout upstream/main -b cherry-pick-release
|
||||||
git cherry-pick -x -m1 upstream/MAJOR.MINOR.x
|
git cherry-pick -x -m1 upstream/MAJOR.MINOR.x
|
||||||
|
|
||||||
#. Open a PR for ``cherry-pick-release`` and merge it once CI passes. No need to wait for approvals if there were no conflicts on the previous step.
|
#. Open a PR for ``cherry-pick-release`` and merge it once CI passes. No need to wait for approvals if there were no conflicts on the previous step.
|
||||||
|
|
||||||
#. For major and minor releases (or the first prerelease of it), tag the release cherry-pick merge commit in main with
|
#. For major and minor releases, tag the release cherry-pick merge commit in main with
|
||||||
a dev tag for the next feature release::
|
a dev tag for the next feature release::
|
||||||
|
|
||||||
git checkout main
|
git checkout main
|
||||||
git pull
|
git pull
|
||||||
git tag MAJOR.{MINOR+1}.0.dev0
|
git tag MAJOR.{MINOR+1}.0.dev0
|
||||||
git push upstream MAJOR.{MINOR+1}.0.dev0
|
git push git@github.com:pytest-dev/pytest.git MAJOR.{MINOR+1}.0.dev0
|
||||||
|
|
||||||
#. For major and minor releases, change the default version in the `Read the Docs Settings <https://readthedocs.org/dashboard/pytest/advanced/>`_ to the new branch.
|
|
||||||
|
|
||||||
#. Send an email announcement with the contents from::
|
#. Send an email announcement with the contents from::
|
||||||
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
Terminal Reporting: Fixed bug when running in ``--tb=line`` mode where ``pytest.fail(pytrace=False)`` tests report ``None``.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Update test log report annotation to named tuple and fixed inconsistency in docs for :hook:`pytest_report_teststatus` hook.
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
Added :func:`ExceptionInfo.from_exception() <pytest.ExceptionInfo.from_exception>`, a simpler way to create an :class:`~pytest.ExceptionInfo` from an exception.
|
|
||||||
This can replace :func:`ExceptionInfo.from_exc_info() <pytest.ExceptionInfo.from_exc_info()>` for most uses.
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
When an exception traceback to be displayed is completely filtered out (by mechanisms such as ``__tracebackhide__``, internal frames, and similar), now only the exception string and the following message are shown:
|
|
||||||
|
|
||||||
"All traceback entries are hidden. Pass `--full-trace` to see hidden and internal frames.".
|
|
||||||
|
|
||||||
Previously, the last frame of the traceback was shown, even though it was hidden.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
Improved verbose output (``-vv``) of ``skip`` and ``xfail`` reasons by performing text wrapping while leaving a clear margin for progress output.
|
|
||||||
|
|
||||||
Added :func:`TerminalReporter.wrap_write() <pytest.TerminalReporter.wrap_write>` as a helper for that.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Added handling of ``%f`` directive to print microseconds in log format options, such as ``log-date-format``.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Added underlying exception to cache provider path creation and write warning messages.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Added warning when :confval:`testpaths` is set, but paths are not found by glob. In this case, pytest will fall back to searching from the current directory.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Enhanced the CLI flag for ``-c`` to now include ``--config-file`` to make it clear that this flag applies to the usage of a custom config file.
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
When `--confcutdir` is not specified, and there is no config file present, the conftest cutoff directory (`--confcutdir`) is now set to the :ref:`rootdir`.
|
|
||||||
Previously in such cases, `conftest.py` files would be probed all the way to the root directory of the filesystem.
|
|
||||||
If you are badly affected by this change, consider adding an empty config file to your desired cutoff directory, or explicitly set `--confcutdir`.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Fixed the ``--last-failed`` whole-file skipping functionality ("skipped N files") for :ref:`non-python test files <non-python tests>`.
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
The :confval:`norecursedir` check is now performed in a :hook:`pytest_ignore_collect` implementation, so plugins can affect it.
|
|
||||||
|
|
||||||
If after updating to this version you see that your `norecursedir` setting is not being respected,
|
|
||||||
it means that a conftest or a plugin you use has a bad `pytest_ignore_collect` implementation.
|
|
||||||
Most likely, your hook returns `False` for paths it does not want to ignore,
|
|
||||||
which ends the processing and doesn't allow other plugins, including pytest itself, to ignore the path.
|
|
||||||
The fix is to return `None` instead of `False` for paths your hook doesn't want to ignore.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Fixed traceback entries hidden with ``__tracebackhide__ = True`` still being shown for chained exceptions (parts after "... the above exception ..." message).
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Improved docs for `pytester.copy_example`.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Add automatically generated :ref:`plugin-list`. The list is updated on a periodic schedule.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Tests are now ordered by definition order in more cases.
|
||||||
|
|
||||||
|
In a class hierarchy, tests from base classes are now consistently ordered before tests defined on their subclasses (reverse MRO order).
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Fixed an issue where ``__main__.py`` would raise an ``ImportError`` when ``--doctest-modules`` was provided.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Added two environment variables :envvar:`PYTEST_THEME` and :envvar:`PYTEST_THEME_MODE` to let the users customize the pygments theme used.
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
The :ref:`Node.reportinfo() <non-python tests>` function first return value type has been expanded from `py.path.local | str` to `os.PathLike[str] | str`.
|
||||||
|
|
||||||
|
Most plugins which refer to `reportinfo()` only define it as part of a custom :class:`pytest.Item` implementation.
|
||||||
|
Since `py.path.local` is a `os.PathLike[str]`, these plugins are unaffacted.
|
||||||
|
|
||||||
|
Plugins and users which call `reportinfo()`, use the first return value and interact with it as a `py.path.local`, would need to adjust by calling `py.path.local(fspath)`.
|
||||||
|
Although preferably, avoid the legacy `py.path.local` and use `pathlib.Path`, or use `item.location` or `item.path`, instead.
|
||||||
|
|
||||||
|
Note: pytest was not able to provide a deprecation period for this change.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
``py.path.local`` arguments for hooks have been deprecated. See :ref:`the deprecation note <legacy-path-hooks-deprecated>` for full details.
|
||||||
|
|
||||||
|
``py.path.local`` arguments to Node constructors have been deprecated. See :ref:`the deprecation note <node-ctor-fspath-deprecation>` for full details.
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
Added :meth:`cache.mkdir() <pytest.Cache.mkdir>`, which is similar to the existing :meth:`cache.makedir() <pytest.Cache.makedir>`,
|
||||||
|
but returns a :class:`pathlib.Path` instead of a legacy ``py.path.local``.
|
||||||
|
|
||||||
|
Added a ``paths`` type to :meth:`parser.addini() <pytest.Parser.addini>`,
|
||||||
|
as in ``parser.addini("mypaths", "my paths", type="paths")``,
|
||||||
|
which is similar to the existing ``pathlist``,
|
||||||
|
but returns a list of :class:`pathlib.Path` instead of legacy ``py.path.local``.
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
Directly constructing the following classes is now deprecated:
|
||||||
|
|
||||||
|
- ``_pytest.mark.structures.Mark``
|
||||||
|
- ``_pytest.mark.structures.MarkDecorator``
|
||||||
|
- ``_pytest.mark.structures.MarkGenerator``
|
||||||
|
- ``_pytest.python.Metafunc``
|
||||||
|
- ``_pytest.runner.CallInfo``
|
||||||
|
- ``_pytest._code.ExceptionInfo``
|
||||||
|
- ``_pytest.config.argparsing.Parser``
|
||||||
|
- ``_pytest.config.argparsing.OptionGroup``
|
||||||
|
- ``_pytest.pytester.HookRecorder``
|
||||||
|
|
||||||
|
These constructors have always been considered private, but now issue a deprecation warning, which may become a hard error in pytest 8.
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
The types of objects used in pytest's API are now exported so they may be used in type annotations.
|
||||||
|
|
||||||
|
The newly-exported types are:
|
||||||
|
|
||||||
|
- ``pytest.Config`` for :class:`Config <pytest.Config>`.
|
||||||
|
- ``pytest.Mark`` for :class:`marks <pytest.Mark>`.
|
||||||
|
- ``pytest.MarkDecorator`` for :class:`mark decorators <pytest.MarkDecorator>`.
|
||||||
|
- ``pytest.MarkGenerator`` for the :class:`pytest.mark <pytest.MarkGenerator>` singleton.
|
||||||
|
- ``pytest.Metafunc`` for the :class:`metafunc <pytest.MarkGenerator>` argument to the :func:`pytest_generate_tests <pytest.hookspec.pytest_generate_tests>` hook.
|
||||||
|
- ``pytest.CallInfo`` for the :class:`CallInfo <pytest.CallInfo>` type passed to various hooks.
|
||||||
|
- ``pytest.PytestPluginManager`` for :class:`PytestPluginManager <pytest.PytestPluginManager>`.
|
||||||
|
- ``pytest.ExceptionInfo`` for the :class:`ExceptionInfo <pytest.ExceptionInfo>` type returned from :func:`pytest.raises` and passed to various hooks.
|
||||||
|
- ``pytest.Parser`` for the :class:`Parser <pytest.Parser>` type passed to the :func:`pytest_addoption <pytest.hookspec.pytest_addoption>` hook.
|
||||||
|
- ``pytest.OptionGroup`` for the :class:`OptionGroup <pytest.OptionGroup>` type returned from the :func:`parser.addgroup <pytest.Parser.getgroup>` method.
|
||||||
|
- ``pytest.HookRecorder`` for the :class:`HookRecorder <pytest.HookRecorder>` type returned from :class:`~pytest.Pytester`.
|
||||||
|
- ``pytest.RecordedHookCall`` for the :class:`RecordedHookCall <pytest.HookRecorder>` type returned from :class:`~pytest.HookRecorder`.
|
||||||
|
- ``pytest.RunResult`` for the :class:`RunResult <pytest.RunResult>` type returned from :class:`~pytest.Pytester`.
|
||||||
|
- ``pytest.LineMatcher`` for the :class:`LineMatcher <pytest.RunResult>` type used in :class:`~pytest.RunResult` and others.
|
||||||
|
- ``pytest.TestReport`` for the :class:`TestReport <pytest.TestReport>` type used in various hooks.
|
||||||
|
- ``pytest.CollectReport`` for the :class:`CollectReport <pytest.CollectReport>` type used in various hooks.
|
||||||
|
|
||||||
|
Constructing most of them directly is not supported; they are only meant for use in type annotations.
|
||||||
|
Doing so will emit a deprecation warning, and may become a hard-error in pytest 8.0.
|
||||||
|
|
||||||
|
Subclassing them is also not supported. This is not currently enforced at runtime, but is detected by type-checkers such as mypy.
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
:ref:`--import-mode=importlib <import-modes>` now works with features that
|
||||||
|
depend on modules being on :py:data:`sys.modules`, such as :mod:`pickle` and :mod:`dataclasses`.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
Improved error messages when parsing warning filters.
|
||||||
|
|
||||||
|
Previously pytest would show an internal traceback, which besides being ugly sometimes would hide the cause
|
||||||
|
of the problem (for example an ``ImportError`` while importing a specific warning type).
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Fixed failing ``staticmethod`` test cases if they are inherited from a parent test class.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Migrate to ``setuptools_scm`` 6.x to use ``SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST`` for more robust release tooling.
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
The following hooks now receive an additional ``pathlib.Path`` argument, equivalent to an existing ``py.path.local`` argument:
|
||||||
|
|
||||||
|
- :func:`pytest_ignore_collect <_pytest.hookspec.pytest_ignore_collect>` - The ``fspath`` parameter (equivalent to existing ``path`` parameter).
|
||||||
|
- :func:`pytest_collect_file <_pytest.hookspec.pytest_collect_file>` - The ``fspath`` parameter (equivalent to existing ``path`` parameter).
|
||||||
|
- :func:`pytest_pycollect_makemodule <_pytest.hookspec.pytest_pycollect_makemodule>` - The ``fspath`` parameter (equivalent to existing ``path`` parameter).
|
||||||
|
- :func:`pytest_report_header <_pytest.hookspec.pytest_report_header>` - The ``startpath`` parameter (equivalent to existing ``startdir`` parameter).
|
||||||
|
- :func:`pytest_report_collectionfinish <_pytest.hookspec.pytest_report_collectionfinish>` - The ``startpath`` parameter (equivalent to existing ``startdir`` parameter).
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
The following changes have been made to internal pytest types/functions:
|
||||||
|
|
||||||
|
- The ``path`` property of ``_pytest.code.Code`` returns ``Path`` instead of ``py.path.local``.
|
||||||
|
- The ``path`` property of ``_pytest.code.TracebackEntry`` returns ``Path`` instead of ``py.path.local``.
|
||||||
|
- The ``_pytest.code.getfslineno()`` function returns ``Path`` instead of ``py.path.local``.
|
||||||
|
- The ``_pytest.python.path_matches_patterns()`` function takes ``Path`` instead of ``py.path.local``.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
``testdir.makefile`` now silently accepts values which don't start with ``.`` to maintain backward compatibility with older pytest versions.
|
||||||
|
|
||||||
|
``pytester.makefile`` now issues a clearer error if the ``.`` is missing in the ``ext`` argument.
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
Raising :class:`unittest.SkipTest` to skip collection of tests during the
|
||||||
|
pytest collection phase is deprecated. Use :func:`pytest.skip` instead.
|
||||||
|
|
||||||
|
Note: This deprecation only relates to using :class:`unittest.SkipTest` during test
|
||||||
|
collection. You are probably not doing that. Ordinary usage of
|
||||||
|
:class:`unittest.SkipTest` / :meth:`unittest.TestCase.skipTest` /
|
||||||
|
:func:`unittest.skip` in unittest test cases is fully supported.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
``--version`` now writes version information to ``stdout`` rather than ``stderr``.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Internal Restructure: let ``python.PyObjMixin`` inherit from ``nodes.Node`` to carry over typing information.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Implement ``Node.path`` as a ``pathlib.Path``.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Fixed issue where pytest's ``faulthandler`` support would not dump traceback on crashes
|
||||||
|
if the :mod:`faulthandler` module was already enabled during pytest startup (using
|
||||||
|
``python -X dev -m pytest`` for example).
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
Several behaviors of :meth:`Parser.addoption <pytest.Parser.addoption>` are now
|
||||||
|
scheduled for removal in pytest 8 (deprecated since pytest 2.4.0):
|
||||||
|
|
||||||
|
- ``parser.addoption(..., help=".. %default ..")`` - use ``%(default)s`` instead.
|
||||||
|
- ``parser.addoption(..., type="int/string/float/complex")`` - use ``type=int`` etc. instead.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Fixed an issue where illegal directory characters derived from ``getpass.getuser()`` raised an ``OSError``.
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
Improved :func:`pytest.approx` assertion messages for sequences of numbers.
|
||||||
|
|
||||||
|
The assertion messages now dumps a table with the index and the error of each diff.
|
||||||
|
Example::
|
||||||
|
|
||||||
|
> assert [1, 2, 3, 4] == pytest.approx([1, 3, 3, 5])
|
||||||
|
E assert comparison failed for 2 values:
|
||||||
|
E Index | Obtained | Expected
|
||||||
|
E 1 | 2 | 3 +- 3.0e-06
|
||||||
|
E 3 | 4 | 5 +- 5.0e-06
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Recommend `numpy.testing <https://numpy.org/doc/stable/reference/routines.testing.html>`__ module on :func:`pytest.approx` documentation.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Fix ``Class.from_parent`` so it forwards extra keyword arguments to the constructor.
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
The test selection options ``pytest -k`` and ``pytest -m`` now support matching
|
||||||
|
names containing forward slash (``/``) characters.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
The ``@pytest.mark.skip`` decorator now correctly handles its arguments. When the ``reason`` argument is accidentally given both positional and as a keyword (e.g. because it was confused with ``skipif``), a ``TypeError`` now occurs. Before, such tests were silently skipped, and the positional argument ignored. Additionally, ``reason`` is now documented correctly as positional or keyword (rather than keyword-only).
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Use private names for internal fixtures that handle classic setup/teardown so that they don't show up with the default ``--fixtures`` invocation (but they still show up with ``--fixtures -v``).
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
By default, pytest will truncate long strings in assert errors so they don't clutter the output too much,
|
||||||
|
currently at ``240`` characters by default.
|
||||||
|
|
||||||
|
However, in some cases the longer output helps, or is even crucial, to diagnose a failure. Using ``-v`` will
|
||||||
|
now increase the truncation threshold to ``2400`` characters, and ``-vv`` or higher will disable truncation entirely.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
:func:`pytest.approx` now works on :class:`~decimal.Decimal` within mappings/dicts and sequences/lists.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Improve error message when :func:`pytest.skip` is used at module level without passing `allow_module_level=True`.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
Defining a custom pytest node type which is both an :class:`pytest.Item <Item>` and a :class:`pytest.Collector <Collector>` (e.g. :class:`pytest.File <File>`) now issues a warning.
|
||||||
|
It was never sanely supported and triggers hard to debug errors.
|
||||||
|
|
||||||
|
See :ref:`the deprecation note <diamond-inheritance-deprecated>` for full details.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
The :confval:`required_plugins` config option now works correctly when pre-releases of plugins are installed, rather than falsely claiming that those plugins aren't installed at all.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
``-c <config file>`` now also properly defines ``rootdir`` as the directory that contains ``<config file>``.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
:meth:`pytest.MonkeyPatch.syspath_prepend` no longer fails when
|
||||||
|
``setuptools`` is not installed.
|
||||||
|
It now only calls :func:`pkg_resources.fixup_namespace_packages` if
|
||||||
|
``pkg_resources`` was previously imported, because it is not needed otherwise.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
Fixed issue where :meth:`unittest.TestCase.setUpClass` is not called when a test has `/` in its name since pytest 6.2.0.
|
||||||
|
|
||||||
|
This refers to the path part in pytest node IDs, e.g. ``TestClass::test_it`` in the node ID ``tests/test_file.py::TestClass::test_it``.
|
||||||
|
|
||||||
|
Now, instead of assuming that the test name does not contain ``/``, it is assumed that test path does not contain ``::``. We plan to hopefully make both of these work in the future.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Introduce fix to handle precision width in ``log-cli-format`` in turn to fix output coloring for certain formats.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
:func:`pytest_cmdline_preparse <_pytest.hookspec.pytest_cmdline_preparse>` has been officially deprecated. It will be removed in a future release. Use :func:`pytest_load_initial_conftests <_pytest.hookspec.pytest_load_initial_conftests>` instead.
|
||||||
|
|
||||||
|
See :ref:`the deprecation note <cmdline-preparse-deprecated>` for full details.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
pytest invocations with ``--fixtures-per-test`` and ``--fixtures`` have been enriched with:
|
||||||
|
|
||||||
|
- Fixture location path printed with the fixture name.
|
||||||
|
- First section of the fixture's docstring printed under the fixture name.
|
||||||
|
- Whole of fixture's docstring printed under the fixture name using ``--verbose`` option.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
:func:`pytest.warns(None) <pytest.warns>` is now deprecated because many people used
|
||||||
|
it to mean "this code does not emit warnings", but it actually had the effect of
|
||||||
|
checking that the code emits at least one warning of any type - like ``pytest.warns()``
|
||||||
|
or ``pytest.warns(Warning)``.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Help text for ``--pdbcls`` more accurately reflects the option's behavior.
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
:func:`_pytest.logging.LogCaptureFixture.set_level` and :func:`_pytest.logging.LogCaptureFixture.at_level`
|
|
||||||
will temporarily enable the requested ``level`` if ``level`` was disabled globally via
|
|
||||||
``logging.disable(LEVEL)``.
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
New :ref:`version-tuple` attribute, which makes it simpler for users to do something depending on the pytest version (such as declaring hooks which are introduced in later versions).
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Switch TOML parser from ``toml`` to ``tomli`` for TOML v1.0.0 support in ``pyproject.toml``.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Fixed internal error when skipping doctests.
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
It is now possible to add colors to custom log levels on cli log.
|
||||||
|
|
||||||
|
By using :func:`add_color_level <_pytest.logging.add_color_level>` from a ``pytest_configure`` hook, colors can be added::
|
||||||
|
|
||||||
|
logging_plugin = config.pluginmanager.get_plugin('logging-plugin')
|
||||||
|
logging_plugin.log_cli_handler.formatter.add_color_level(logging.INFO, 'cyan')
|
||||||
|
logging_plugin.log_cli_handler.formatter.add_color_level(logging.SPAM, 'blue')
|
||||||
|
|
||||||
|
See :ref:`log_colors` for more information.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Ensure ``regendoc`` opts out of ``TOX_ENV`` cachedir selection to ensure independent example test runs.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
When showing fixture paths in `--fixtures` or `--fixtures-by-test`, fixtures coming from pytest itself now display an elided path, rather than the full path to the file in the `site-packages` directory.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Complex numbers are now treated like floats and integers when generating parameterization IDs.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
The private ``CallSpec2._arg2scopenum`` attribute has been removed after an internal refactoring.
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
Added :class:`pytest.Stash`, a facility for plugins to store their data on :class:`~pytest.Config` and :class:`~_pytest.nodes.Node`\s in a type-safe and conflict-free manner.
|
||||||
|
See :ref:`plugin-stash` for details.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
:func:`pytest.skip(msg=...) <pytest.skip>`, :func:`pytest.fail(msg=...) <pytest.fail>` and :func:`pytest.exit(msg=...) <pytest.exit>`
|
||||||
|
signatures now accept a ``reason`` argument instead of ``msg``. Using ``msg`` still works, but is deprecated and will be removed in a future release.
|
||||||
|
|
||||||
|
This was changed for consistency with :func:`pytest.mark.skip <pytest.mark.skip>` and :func:`pytest.mark.xfail <pytest.mark.xfail>` which both accept
|
||||||
|
``reason`` as an argument.
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
:class:`RunResult <_pytest.pytester.RunResult>` method :meth:`assert_outcomes <_pytest.pytester.RunResult.assert_outcomes>` now accepts a
|
||||||
|
``warnings`` argument to assert the total number of warnings captured.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
``--debug`` flag now accepts a :class:`str` file to route debug logs into, remains defaulted to `pytestdebug.log`.
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
:func:`pytest_assertion_pass <_pytest.hookspec.pytest_assertion_pass>` is no longer considered experimental and
|
||||||
|
future changes to it will be considered more carefully.
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
The test selection options ``pytest -k`` and ``pytest -m`` now support matching names containing backslash (`\\`) characters.
|
||||||
|
Backslashes are treated literally, not as escape characters (the values being matched against are already escaped).
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Fix `pytest -vv` crashing with an internal exception `AttributeError: 'str' object has no attribute 'relative_to'` in some cases.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
Full diffs are now always shown for equality assertions of iterables when
|
||||||
|
`CI` or ``BUILD_NUMBER`` is found in the environment, even when ``-v`` isn't
|
||||||
|
used.
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
Using :func:`pytest.approx` in a boolean context now raises an error hinting at the proper usage.
|
||||||
|
|
||||||
|
It is apparently common for users to mistakenly use ``pytest.approx`` like this:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
assert pytest.approx(actual, expected)
|
||||||
|
|
||||||
|
While the correct usage is:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
assert actual == pytest.approx(expected)
|
||||||
|
|
||||||
|
The new error message helps catch those mistakes.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
``--stepwise-skip`` now implicitly enables ``--stepwise`` and can be used on its own.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Fixed confusing error message when ``request.fspath`` / ``request.path`` was accessed from a session-scoped fixture.
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
:class:`RunResult <_pytest.pytester.RunResult>` method :meth:`assert_outcomes <_pytest.pytester.RunResult.assert_outcomes>` now accepts a
|
||||||
|
``deselected`` argument to assert the total number of deselected tests.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Added :confval:`pythonpath` setting that adds listed paths to :data:`sys.path` for the duration of the test session. If you currently use the pytest-pythonpath or pytest-srcpaths plugins, you should be able to replace them with built-in `pythonpath` setting.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Fixed the URL used by ``--pastebin`` to use `bpa.st <http://bpa.st>`__.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
The end line number and end column offset are now properly set for rewritten assert statements.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Support for the ``files`` API from ``importlib.resources`` within rewritten files.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Add github action to upload coverage report to codecov instead of bash uploader.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
:meth:`pytest.Cache.set` now preserves key order when saving dicts.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Remove incorrect docs about ``confcutdir`` being a configuration option: it can only be set through the ``--confcutdir`` command-line option.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Changed the command used to create sdist and wheel artifacts: using the build package instead of setup.py.
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user