Compare commits

..

1 Commits

Author SHA1 Message Date
pytest bot
3902c79ec9 [automated] Update plugin list 2021-06-20 00:09:02 +00:00
303 changed files with 9680 additions and 29040 deletions

View File

@@ -25,7 +25,6 @@ exclude_lines =
^\s*raise NotImplementedError\b ^\s*raise NotImplementedError\b
^\s*return NotImplemented\b ^\s*return NotImplemented\b
^\s*assert False(,|$) ^\s*assert False(,|$)
^\s*assert_never\(
^\s*if TYPE_CHECKING: ^\s*if TYPE_CHECKING:
^\s*@overload( |$) ^\s*@overload( |$)

View File

@@ -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

View File

@@ -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 }}

View File

@@ -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

View File

@@ -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: |
@@ -194,22 +165,78 @@ jobs:
if: "matrix.use_coverage" if: "matrix.use_coverage"
run: "tox -e ${{ matrix.tox_env }}-coverage" run: "tox -e ${{ matrix.tox_env }}-coverage"
- name: Generate coverage report - name: Upload coverage
if: "matrix.use_coverage" if: matrix.use_coverage && github.repository == 'pytest-dev/pytest'
run: python -m coverage xml env:
CODECOV_NAME: ${{ matrix.name }}
run: bash scripts/upload-coverage.sh -F GHA,${{ runner.os }}
- name: Upload coverage to Codecov linting:
if: "matrix.use_coverage"
uses: codecov/codecov-action@v3
continue-on-error: true
with:
fail_ci_if_error: true
files: ./coverage.xml
verbose: true
check-package:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: read
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 persist-credentials: false
- uses: actions/setup-python@v2
- name: set PY
run: echo "name=PY::$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')" >> $GITHUB_ENV
- uses: actions/cache@v2
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- run: tox -e linting
deploy:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'pytest-dev/pytest'
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: write
needs: [build]
steps:
- uses: actions/checkout@v2
with:
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 wheel setuptools tox
- name: Build package
run: |
python setup.py sdist bdist_wheel
- 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

View File

@@ -11,10 +11,6 @@ on:
description: 'Major release? (yes/no)' description: 'Major release? (yes/no)'
required: true required: true
default: 'no' default: 'no'
prerelease:
description: 'Prerelease (ex: rc1). Leave empty if not a pre-release.'
required: false
default: ''
# Set permissions at the job level. # Set permissions at the job level.
permissions: {} permissions: {}
@@ -27,12 +23,13 @@ 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
persist-credentials: false
- 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"
@@ -44,9 +41,9 @@ jobs:
- name: Prepare release PR (minor/patch release) - name: Prepare release PR (minor/patch release)
if: github.event.inputs.major == 'no' if: github.event.inputs.major == 'no'
run: | run: |
tox -e prepare-release-pr -- ${{ github.event.inputs.branch }} ${{ github.token }} --prerelease='${{ github.event.inputs.prerelease }}' tox -e prepare-release-pr -- ${{ github.event.inputs.branch }} ${{ github.token }}
- name: Prepare release PR (major release) - name: Prepare release PR (major release)
if: github.event.inputs.major == 'yes' if: github.event.inputs.major == 'yes'
run: | run: |
tox -e prepare-release-pr -- ${{ github.event.inputs.branch }} ${{ github.token }} --major --prerelease='${{ github.event.inputs.prerelease }}' tox -e prepare-release-pr -- ${{ github.event.inputs.branch }} ${{ github.token }} --major

View File

@@ -0,0 +1,40 @@
# part of our release process, see `release-on-comment.py`
name: release on comment
on:
issues:
types: [opened, edited]
issue_comment:
types: [created, edited]
# Set permissions at the job level.
permissions: {}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
if: (github.event.comment && startsWith(github.event.comment.body, '@pytestbot please')) || (github.event.issue && !github.event.comment && startsWith(github.event.issue.body, '@pytestbot please'))
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools tox
- name: Prepare release
run: |
tox -e release-on-comment -- $GITHUB_EVENT_PATH ${{ github.token }}

View File

@@ -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

View File

@@ -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,25 +19,25 @@ 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
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install packaging requests tabulate[widechars] tqdm pip install packaging requests tabulate[widechars]
- name: Update Plugin List - name: Update Plugin List
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>'

4
.gitignore vendored
View File

@@ -50,10 +50,6 @@ coverage.xml
.project .project
.settings .settings
.vscode .vscode
__pycache__/
# generated by pip # generated by pip
pip-wheel-metadata/ pip-wheel-metadata/
# pytest debug logs generated via --debug
pytestdebug.log

View File

@@ -1,16 +1,16 @@
repos: repos:
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 23.3.0 rev: 21.5b2
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.10.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,44 @@ 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: 3.9.2
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.5.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.19.1
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.17.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.8.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.812
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
- 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 +90,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]

View File

@@ -1,22 +1,12 @@
version: 2 version: 2
python: python:
version: 3.7
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:
os: ubuntu-20.04
tools:
python: "3.9"
apt_packages:
- inkscape
formats: formats:
- epub - epub
- pdf - pdf
- htmlzip

72
AUTHORS
View File

@@ -8,18 +8,12 @@ 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
Alexei Kozlenok Alexei Kozlenok
Alice Purcell
Allan Feldman Allan Feldman
Aly Sivji Aly Sivji
Amir Elkess Amir Elkess
@@ -42,15 +36,12 @@ Anton Grinevich
Anton Lodder Anton Lodder
Antony Lee Antony Lee
Arel Cordero Arel Cordero
Arias Emmanuel
Ariel Pillemer 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 +49,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 +60,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
@@ -89,14 +75,11 @@ Christopher Gilling
Claire Cecil Claire Cecil
Claudio Madotto Claudio Madotto
CrazyMerlyn CrazyMerlyn
Cristian Vera
Cyrus Maden Cyrus Maden
Damian Skrzypczak 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
@@ -110,7 +93,6 @@ David Vierra
Daw-Ran Liou Daw-Ran Liou
Debi Mishra Debi Mishra
Denis Kirisov Denis Kirisov
Denivy Braiam Rück
Dhiren Serai Dhiren Serai
Diego Russo Diego Russo
Dmitry Dygalo Dmitry Dygalo
@@ -123,32 +105,25 @@ Edson Tadeu M. Manoel
Eduardo Schettino Eduardo Schettino
Eli Boyarski Eli Boyarski
Elizaveta Shashkova Elizaveta Shashkova
Éloi Rivard
Endre Galaczi Endre Galaczi
Eric Hunsberger Eric Hunsberger
Eric Liu
Eric Siegerman 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
Graham Horler Graham Horler
Greg Price Greg Price
Gregory Lee Gregory Lee
@@ -157,7 +132,6 @@ Grigorii Eremeev (budulianin)
Guido Wesdorp Guido Wesdorp
Guoqiang Zhang Guoqiang Zhang
Harald Armin Massa Harald Armin Massa
Harshna
Henk-Jaap Wagenaar Henk-Jaap Wagenaar
Holger Kohr Holger Kohr
Hugo van Kemenade Hugo van Kemenade
@@ -166,13 +140,10 @@ 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
Jan Balster Jan Balster
Janne Vanhala Janne Vanhala
Jason R. Coombs Jason R. Coombs
@@ -182,9 +153,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 +163,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 +198,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 +211,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
@@ -256,8 +219,6 @@ Michael Goerz
Michael Krebs Michael Krebs
Michael Seifert Michael Seifert
Michal Wajszczuk Michal Wajszczuk
Michał Zięba
Mickey Pashov
Mihai Capotă Mihai Capotă
Mike Hoyle (hoylemd) Mike Hoyle (hoylemd)
Mike Lundy Mike Lundy
@@ -271,10 +232,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 +242,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 +257,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 +276,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
@@ -350,36 +300,28 @@ Sven-Hendrik Haase
Sylvain Marié Sylvain Marié
Tadek Teleżyński Tadek Teleżyński
Takafumi Arakaki Takafumi Arakaki
Taneli Hukkinen
Tanvi Mehta Tanvi Mehta
Tarcisio Fischer Tarcisio Fischer
Tareq Alayan Tareq Alayan
Tatiana Ovary
Ted Xiao Ted Xiao
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 +334,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

View File

@@ -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
@@ -331,7 +324,7 @@ Here is a simple overview, with pytest-specific bits:
Writing Tests Writing Tests
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
Writing tests for plugins or for pytest itself is often done using the `pytester fixture <https://docs.pytest.org/en/stable/reference/reference.html#pytester>`_, as a "black-box" test. Writing tests for plugins or for pytest itself is often done using the `pytester fixture <https://docs.pytest.org/en/stable/reference.html#pytester>`_, as a "black-box" test.
For example, to ensure a simple test passes you can write: For example, to ensure a simple test passes you can write:
@@ -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:

View File

@@ -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

View File

@@ -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
@@ -37,15 +37,6 @@
:target: https://pytest.readthedocs.io/en/latest/?badge=latest :target: https://pytest.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status :alt: Documentation Status
.. image:: https://img.shields.io/badge/Discord-pytest--dev-blue
:target: https://discord.com/invite/pytest-dev
:alt: Discord
.. image:: https://img.shields.io/badge/Libera%20chat-%23pytest-orange
:target: https://web.libera.chat/#pytest
:alt: Libera chat
The ``pytest`` framework makes it easy to write small tests, yet The ``pytest`` framework makes it easy to write small tests, yet
scales to support complex functional testing for applications and libraries. scales to support complex functional testing for applications and libraries.
@@ -88,19 +79,19 @@ 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/goodpractices.html#python-test-discovery>`_
of test modules and functions of test modules and functions
- `Modular fixtures <https://docs.pytest.org/en/stable/explanation/fixtures.html>`_ for - `Modular fixtures <https://docs.pytest.org/en/stable/fixture.html>`_ for
managing small or parametrized long-lived test resources managing small or parametrized long-lived test resources
- Can run `unittest <https://docs.pytest.org/en/stable/how-to/unittest.html>`_ (or trial), - Can run `unittest <https://docs.pytest.org/en/stable/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/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 +151,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.

View File

@@ -14,90 +14,60 @@ Preparing: Automatic Method
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
We have developed an automated workflow for releases, that uses GitHub workflows and is triggered We have developed an automated workflow for releases, that uses GitHub workflows and is triggered
by `manually running <https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow>`__ by opening an issue.
the `prepare-release-pr workflow <https://github.com/pytest-dev/pytest/actions/workflows/prepare-release-pr.yml>`__
on GitHub Actions.
The automation will decide the new version number based on the following criteria: Bug-fix releases
^^^^^^^^^^^^^^^^
- If the "major release" input is set to "yes", release a new major release A bug-fix release is always done from a maintenance branch, so for example to release bug-fix
(e.g. 7.0.0 -> 8.0.0) ``5.1.2``, open a new issue and add this comment to the body::
- If there are any ``.feature.rst`` or ``.breaking.rst`` files in the
``changelog`` directory, release a new minor release (e.g. 7.0.0 -> 7.1.0)
- Otherwise, release a bugfix release (e.g. 7.0.0 -> 7.0.1)
- If the "prerelease" input is set, append the string to the version number
(e.g. 7.0.0 -> 8.0.0rc1), if "major" is set, and "prerelease" is set to `rc1`)
Bug-fix and minor releases @pytestbot please prepare release from 5.1.x
^^^^^^^^^^^^^^^^^^^^^^^^^^
Bug-fix and minor releases are always done from a maintenance branch. First, Where ``5.1.x`` is the maintenance branch for the ``5.1`` series.
consider double-checking the ``changelog`` directory to see if there are any
breaking changes or new features.
For a new minor release, first create a new maintenance branch from ``main``:: The automated workflow will publish a PR for a branch ``release-5.1.2``
and notify it as a comment in the issue.
git fetch upstream Minor releases
git branch 7.1.x upstream/main
git push upstream 7.1.x
Then, trigger the workflow with the following inputs:
- branch: **7.1.x**
- major release: **no**
- prerelease: empty
Or via the commandline using `GitHub's cli <https://github.com/cli/cli>`__::
gh workflow run prepare-release-pr.yml -f branch=7.1.x -f major=no -f prerelease=
Where ``7.1.x`` is the maintenance branch for the ``7.1`` series. The automated
workflow will publish a PR for a branch ``release-7.1.0``.
Similarly, for a bug-fix release, use the existing maintenance branch and
trigger the workflow with e.g. ``branch: 7.0.x`` to get a new ``release-7.0.1``
PR.
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 5.2.x upstream/main
git push upstream 8.0.x git push upstream 5.2.x
2. Trigger the workflow with the following inputs: 2. Open a new issue and add this comment to the body::
- branch: **8.0.x** @pytestbot please prepare release from 5.2.x
- major release: **yes**
- prerelease: empty
Or via the commandline:: The automated workflow will publish a PR for a branch ``release-5.2.0`` and
notify it as a comment in the issue.
gh workflow run prepare-release-pr.yml -f branch=8.0.x -f major=yes -f prerelease= Major and release candidates
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The automated workflow will publish a PR for a branch ``release-8.0.0``. 1. Create a new maintenance branch from ``main``::
git fetch --all
git branch 6.0.x upstream/main
git push upstream 6.0.x
2. For a **major release**, open a new issue and add this comment in the body::
@pytestbot please prepare major release from 6.0.x
For a **release candidate**, the comment must be (TODO: `#7551 <https://github.com/pytest-dev/pytest/issues/7551>`__)::
@pytestbot please prepare release candidate from 6.0.x
The automated workflow will publish a PR for a branch ``release-6.0.0`` and
notify it as a comment in the issue.
At this point on, this follows the same workflow as other maintenance branches: bug-fixes are merged At this point on, this follows the same workflow as other maintenance branches: bug-fixes are merged
into ``main`` and ported back to the maintenance branch, even for release candidates. into ``main`` and ported back to the maintenance branch, even for release candidates.
Release candidates
^^^^^^^^^^^^^^^^^^
To release a release candidate, set the "prerelease" input to the version number
suffix to use. To release a ``8.0.0rc1``, proceed like under "major releases", but set:
- branch: 8.0.x
- major release: yes
- prerelease: **rc1**
Or via the commandline::
gh workflow run prepare-release-pr.yml -f branch=8.0.x -f major=yes -f prerelease=rc1
The automated workflow will publish a PR for a branch ``release-8.0.0rc1``.
**A note about release candidates** **A note about release candidates**
During release candidates we can merge small improvements into During release candidates we can merge small improvements into
@@ -136,31 +106,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::

View File

@@ -1 +0,0 @@
Terminal Reporting: Fixed bug when running in ``--tb=line`` mode where ``pytest.fail(pytrace=False)`` tests report ``None``.

View File

@@ -1 +0,0 @@
Update test log report annotation to named tuple and fixed inconsistency in docs for :hook:`pytest_report_teststatus` hook.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -1 +0,0 @@
Added handling of ``%f`` directive to print microseconds in log format options, such as ``log-date-format``.

View File

@@ -1 +0,0 @@
Added underlying exception to cache provider path creation and write warning messages.

View File

@@ -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.

View File

@@ -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.

View 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`.

View File

@@ -1 +0,0 @@
Fixed the ``--last-failed`` whole-file skipping functionality ("skipped N files") for :ref:`non-python test files <non-python tests>`.

View File

@@ -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.

View File

@@ -1 +0,0 @@
Fixed traceback entries hidden with ``__tracebackhide__ = True`` still being shown for chained exceptions (parts after "... the above exception ..." message).

1
changelog/5105.doc.rst Normal file
View File

@@ -0,0 +1 @@
Add automatically generated :ref:`plugin-list`. The list is updated on a periodic schedule.

View File

@@ -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``.

View File

@@ -0,0 +1,12 @@
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``
These have always been considered private, but now issue a deprecation warning, which may become a hard error in pytest 7.0.0.

View File

@@ -0,0 +1,19 @@
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.
Constructing 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 7.0.
Subclassing them is also not supported. This is not currently enforced at runtime, but is detected by type-checkers such as mypy.

View File

@@ -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`.

View File

@@ -0,0 +1 @@
Fixed failing staticmethod test cases if they are inherited from a parent test class.

View File

@@ -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).

View File

@@ -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``.

View File

@@ -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.

View File

@@ -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 `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.

View File

@@ -0,0 +1 @@
Internal Restructure: let python.PyObjMixing inherit from nodes.Node to carry over typing information.

View File

@@ -0,0 +1 @@
Deprecate ``Node.fspath`` as we plan to move off `py.path.local <https://py.readthedocs.io/en/latest/path.html>`__ and switch to :mod:``pathlib``.

View File

@@ -0,0 +1 @@
Implement ``Node.path`` as a ``pathlib.Path``.

View File

@@ -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).

View File

@@ -0,0 +1,5 @@
Several behaviors of :meth:`Parser.addoption <pytest.Parser.addoption>` are now
scheduled for removal in pytest 7 (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.

View File

@@ -0,0 +1 @@
Fixed an issue where illegal directory characters derived from ``getpass.getuser()`` raised an ``OSError``.

View File

@@ -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

1
changelog/8337.doc.rst Normal file
View File

@@ -0,0 +1 @@
Recommend `numpy.testing <https://numpy.org/doc/stable/reference/routines.testing.html>`__ module on :func:`pytest.approx` documentation.

View File

@@ -0,0 +1 @@
Fix ``Class.from_parent`` so it forwards extra keyword arguments to the constructor.

View File

@@ -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).

View File

@@ -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``).

View File

@@ -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.

View File

@@ -0,0 +1 @@
Assert the outcomes for the issue 518 test and fix the test.

View File

@@ -0,0 +1 @@
:func:`pytest.approx` now works on :class:`~decimal.Decimal` within mappings/dicts and sequences/lists.

View File

@@ -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.

View File

@@ -0,0 +1 @@
``-c <config file>`` now also properly defines ``rootdir`` as the directory that contains ``<config file>``.

View File

@@ -0,0 +1 @@
Python 3.10 is now supported.

View 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.

View File

@@ -0,0 +1,5 @@
Fixed issue where `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.

View File

@@ -0,0 +1 @@
Introduce fix to handle precision width in ``log-cli-format`` in turn to fix output coloring for certain formats.

View File

@@ -0,0 +1,5 @@
pytest invocations with ``--fixtures-per-test`` and ``--fixtures`` have been enabled 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.

View File

@@ -0,0 +1,4 @@
Reducing confusion from `pytest.warns(None)` by:
- Allowing no arguments to be passed in order to catch any exception (no argument defaults to `Warning`).
- Emit a deprecation warning if passed `None`.

1
changelog/8655.doc.rst Normal file
View File

@@ -0,0 +1 @@
Help text for ``--pdbcls`` more accurately reflects the option's behavior.

View File

@@ -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)``.

View File

@@ -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).

View File

@@ -34,10 +34,6 @@ REGENDOC_ARGS := \
regen: REGENDOC_FILES:=*.rst */*.rst regen: REGENDOC_FILES:=*.rst */*.rst
regen: regen:
# need to reset cachedir to the non-tox default PYTHONDONTWRITEBYTECODE=1 PYTEST_ADDOPTS="-pno:hypothesis -Wignore::pytest.PytestUnknownMarkWarning" COLUMNS=76 regendoc --update ${REGENDOC_FILES} ${REGENDOC_ARGS}
PYTHONDONTWRITEBYTECODE=1 \
PYTEST_ADDOPTS="-pno:hypothesis -p no:hypothesispytest -Wignore::pytest.PytestUnknownMarkWarning -o cache_dir=.pytest_cache" \
COLUMNS=76 \
regendoc --update ${REGENDOC_FILES} ${REGENDOC_ARGS}
.PHONY: regen .PHONY: regen

View File

@@ -17,6 +17,7 @@
<li><a href="{{ pathto('changelog') }}">Changelog</a></li> <li><a href="{{ pathto('changelog') }}">Changelog</a></li>
<li><a href="{{ pathto('contributing') }}">Contributing</a></li> <li><a href="{{ pathto('contributing') }}">Contributing</a></li>
<li><a href="{{ pathto('backwards-compatibility') }}">Backwards Compatibility</a></li> <li><a href="{{ pathto('backwards-compatibility') }}">Backwards Compatibility</a></li>
<li><a href="{{ pathto('py27-py34-deprecation') }}">Python 2.7 and 3.4 Support</a></li>
<li><a href="{{ pathto('sponsor') }}">Sponsor</a></li> <li><a href="{{ pathto('sponsor') }}">Sponsor</a></li>
<li><a href="{{ pathto('tidelift') }}">pytest for Enterprise</a></li> <li><a href="{{ pathto('tidelift') }}">pytest for Enterprise</a></li>
<li><a href="{{ pathto('license') }}">License</a></li> <li><a href="{{ pathto('license') }}">License</a></li>
@@ -29,3 +30,5 @@
{%- endif %} {%- endif %}
<hr> <hr>
<a href="{{ pathto('genindex') }}">Index</a>
<hr>

View File

@@ -10,9 +10,10 @@ Are you an enthusiastic pytest user, the local testing guru in your workplace? O
We will pair experienced pytest users with open source projects, for a month's effort of getting new development teams started with pytest. We will pair experienced pytest users with open source projects, for a month's effort of getting new development teams started with pytest.
In 2015 we are trying this for the first time. In February and March 2015 we will gather volunteers on both sides, in April we will do the work, and in May we will evaluate how it went. This effort is being coordinated by Brianna Laugher. If you have any questions or comments, you can raise them on the `@pytestdotorg twitter account <https://twitter.com/pytestdotorg>`_\, the :issue:`issue tracker <676>` or the `pytest-dev mailing list`_. In 2015 we are trying this for the first time. In February and March 2015 we will gather volunteers on both sides, in April we will do the work, and in May we will evaluate how it went. This effort is being coordinated by Brianna Laugher. If you have any questions or comments, you can raise them on the `@pytestdotorg twitter account <https://twitter.com/pytestdotorg>`_ the `issue tracker`_ or the `pytest-dev mailing list`_.
.. _`issue tracker`: https://github.com/pytest-dev/pytest/issues/676
.. _`pytest-dev mailing list`: https://mail.python.org/mailman/listinfo/pytest-dev .. _`pytest-dev mailing list`: https://mail.python.org/mailman/listinfo/pytest-dev

View File

@@ -6,20 +6,6 @@ Release announcements
:maxdepth: 2 :maxdepth: 2
release-7.3.2
release-7.3.1
release-7.3.0
release-7.2.2
release-7.2.1
release-7.2.0
release-7.1.3
release-7.1.2
release-7.1.1
release-7.1.0
release-7.0.1
release-7.0.0
release-7.0.0rc1
release-6.2.5
release-6.2.4 release-6.2.4
release-6.2.3 release-6.2.3
release-6.2.2 release-6.2.2

View File

@@ -36,12 +36,12 @@ New Features
import pytest ; pytest.main(arglist, pluginlist) import pytest ; pytest.main(arglist, pluginlist)
see http://pytest.org/en/stable/how-to/usage.html for details. see http://pytest.org/en/stable/usage.html for details.
- new and better reporting information in assert expressions - new and better reporting information in assert expressions
if comparing lists, sequences or strings. if comparing lists, sequences or strings.
see http://pytest.org/en/stable/how-to/assert.html#newreport see http://pytest.org/en/stable/assert.html#newreport
- new configuration through ini-files (setup.cfg or tox.ini recognized), - new configuration through ini-files (setup.cfg or tox.ini recognized),
for example:: for example::
@@ -50,7 +50,7 @@ New Features
norecursedirs = .hg data* # don't ever recurse in such dirs norecursedirs = .hg data* # don't ever recurse in such dirs
addopts = -x --pyargs # add these command line options by default addopts = -x --pyargs # add these command line options by default
see http://pytest.org/en/stable/reference/customize.html see http://pytest.org/en/stable/customize.html
- improved standard unittest support. In general py.test should now - improved standard unittest support. In general py.test should now
better be able to run custom unittest.TestCases like twisted trial better be able to run custom unittest.TestCases like twisted trial

View File

@@ -57,7 +57,7 @@ Changes between 2.0.0 and 2.0.1
- refinements to "collecting" output on non-ttys - refinements to "collecting" output on non-ttys
- refine internal plugin registration and --traceconfig output - refine internal plugin registration and --traceconfig output
- introduce a mechanism to prevent/unregister plugins from the - introduce a mechanism to prevent/unregister plugins from the
command line, see http://pytest.org/en/stable/how-to/plugins.html#cmdunregister command line, see http://pytest.org/en/stable/plugins.html#cmdunregister
- activate resultlog plugin by default - activate resultlog plugin by default
- fix regression wrt yielded tests which due to the - fix regression wrt yielded tests which due to the
collection-before-running semantics were not collection-before-running semantics were not

View File

@@ -12,7 +12,7 @@ courtesy of Benjamin Peterson. You can now safely use ``assert``
statements in test modules without having to worry about side effects statements in test modules without having to worry about side effects
or python optimization ("-OO") options. This is achieved by rewriting or python optimization ("-OO") options. This is achieved by rewriting
assert statements in test modules upon import, using a PEP302 hook. assert statements in test modules upon import, using a PEP302 hook.
See https://docs.pytest.org/en/stable/how-to/assert.html for See https://docs.pytest.org/en/stable/assert.html for
detailed information. The work has been partly sponsored by my company, detailed information. The work has been partly sponsored by my company,
merlinux GmbH. merlinux GmbH.

View File

@@ -9,7 +9,7 @@ with these improvements:
- new @pytest.mark.parametrize decorator to run tests with different arguments - new @pytest.mark.parametrize decorator to run tests with different arguments
- new metafunc.parametrize() API for parametrizing arguments independently - new metafunc.parametrize() API for parametrizing arguments independently
- see examples at http://pytest.org/en/stable/example/how-to/parametrize.html - see examples at http://pytest.org/en/stable/example/parametrize.html
- NOTE that parametrize() related APIs are still a bit experimental - NOTE that parametrize() related APIs are still a bit experimental
and might change in future releases. and might change in future releases.
@@ -78,7 +78,7 @@ Changes between 2.1.3 and 2.2.0
or through plugin hooks. Also introduce a "--strict" option which or through plugin hooks. Also introduce a "--strict" option which
will treat unregistered markers as errors will treat unregistered markers as errors
allowing to avoid typos and maintain a well described set of markers allowing to avoid typos and maintain a well described set of markers
for your test suite. See examples at http://pytest.org/en/stable/how-to/mark.html for your test suite. See examples at http://pytest.org/en/stable/mark.html
and its links. and its links.
- issue50: introduce "-m marker" option to select tests based on markers - issue50: introduce "-m marker" option to select tests based on markers
(this is a stricter and more predictable version of "-k" in that "-m" (this is a stricter and more predictable version of "-k" in that "-m"

View File

@@ -13,12 +13,12 @@ re-usable fixture design.
For detailed info and tutorial-style examples, see: For detailed info and tutorial-style examples, see:
http://pytest.org/en/stable/explanation/fixtures.html http://pytest.org/en/stable/fixture.html
Moreover, there is now support for using pytest fixtures/funcargs with Moreover, there is now support for using pytest fixtures/funcargs with
unittest-style suites, see here for examples: unittest-style suites, see here for examples:
http://pytest.org/en/stable/how-to/unittest.html http://pytest.org/en/stable/unittest.html
Besides, more unittest-test suites are now expected to "simply work" Besides, more unittest-test suites are now expected to "simply work"
with pytest. with pytest.

View File

@@ -16,7 +16,7 @@ comes with the following fixes and features:
- yielded test functions will now have autouse-fixtures active but - yielded test functions will now have autouse-fixtures active but
cannot accept fixtures as funcargs - it's anyway recommended to cannot accept fixtures as funcargs - it's anyway recommended to
rather use the post-2.0 parametrize features instead of yield, see: rather use the post-2.0 parametrize features instead of yield, see:
http://pytest.org/en/stable/example/how-to/parametrize.html http://pytest.org/en/stable/example/parametrize.html
- fix autouse-issue where autouse-fixtures would not be discovered - fix autouse-issue where autouse-fixtures would not be discovered
if defined in an a/conftest.py file and tests in a/tests/test_some.py if defined in an a/conftest.py file and tests in a/tests/test_some.py
- fix issue226 - LIFO ordering for fixture teardowns - fix issue226 - LIFO ordering for fixture teardowns

View File

@@ -23,13 +23,14 @@ a full list of details. A few feature highlights:
called if the corresponding setup method succeeded. called if the corresponding setup method succeeded.
- integrate tab-completion on command line options if you - integrate tab-completion on command line options if you
have :pypi:`argcomplete` configured. have `argcomplete <https://pypi.org/project/argcomplete/>`_
configured.
- allow boolean expression directly with skipif/xfail - allow boolean expression directly with skipif/xfail
if a "reason" is also specified. if a "reason" is also specified.
- a new hook ``pytest_load_initial_conftests`` allows plugins like - a new hook ``pytest_load_initial_conftests`` allows plugins like
:pypi:`pytest-django` to `pytest-django <https://pypi.org/project/pytest-django/>`_ to
influence the environment before conftest files import ``django``. influence the environment before conftest files import ``django``.
- reporting: color the last line red or green depending if - reporting: color the last line red or green depending if

View File

@@ -11,7 +11,7 @@ clear information about the circumstances and a simple example which
reproduces the problem. reproduces the problem.
The issue tracker is of course not empty now. We have many remaining The issue tracker is of course not empty now. We have many remaining
"enhancement" issues which we'll hopefully can tackle in 2014 with your "enhacement" issues which we'll hopefully can tackle in 2014 with your
help. help.
For those who use older Python versions, please note that pytest is not For those who use older Python versions, please note that pytest is not

View File

@@ -45,29 +45,29 @@ The py.test Development Team
**New Features** **New Features**
* New ``pytest.mark.skip`` mark, which unconditionally skips marked tests. * New ``pytest.mark.skip`` mark, which unconditionally skips marked tests.
Thanks :user:`MichaelAquilina` for the complete PR (:pull:`1040`). Thanks `@MichaelAquilina`_ for the complete PR (`#1040`_).
* ``--doctest-glob`` may now be passed multiple times in the command-line. * ``--doctest-glob`` may now be passed multiple times in the command-line.
Thanks :user:`jab` and :user:`nicoddemus` for the PR. Thanks `@jab`_ and `@nicoddemus`_ for the PR.
* New ``-rp`` and ``-rP`` reporting options give the summary and full output * New ``-rp`` and ``-rP`` reporting options give the summary and full output
of passing tests, respectively. Thanks to :user:`codewarrior0` for the PR. of passing tests, respectively. Thanks to `@codewarrior0`_ for the PR.
* ``pytest.mark.xfail`` now has a ``strict`` option which makes ``XPASS`` * ``pytest.mark.xfail`` now has a ``strict`` option which makes ``XPASS``
tests to fail the test suite, defaulting to ``False``. There's also a tests to fail the test suite, defaulting to ``False``. There's also a
``xfail_strict`` ini option that can be used to configure it project-wise. ``xfail_strict`` ini option that can be used to configure it project-wise.
Thanks :user:`rabbbit` for the request and :user:`nicoddemus` for the PR (:issue:`1355`). Thanks `@rabbbit`_ for the request and `@nicoddemus`_ for the PR (`#1355`_).
* ``Parser.addini`` now supports options of type ``bool``. Thanks * ``Parser.addini`` now supports options of type ``bool``. Thanks
:user:`nicoddemus` for the PR. `@nicoddemus`_ for the PR.
* New ``ALLOW_BYTES`` doctest option strips ``b`` prefixes from byte strings * New ``ALLOW_BYTES`` doctest option strips ``b`` prefixes from byte strings
in doctest output (similar to ``ALLOW_UNICODE``). in doctest output (similar to ``ALLOW_UNICODE``).
Thanks :user:`jaraco` for the request and :user:`nicoddemus` for the PR (:issue:`1287`). Thanks `@jaraco`_ for the request and `@nicoddemus`_ for the PR (`#1287`_).
* give a hint on KeyboardInterrupt to use the --fulltrace option to show the errors, * give a hint on KeyboardInterrupt to use the --fulltrace option to show the errors,
this fixes :issue:`1366`. this fixes `#1366`_.
Thanks to :user:`hpk42` for the report and :user:`RonnyPfannschmidt` for the PR. Thanks to `@hpk42`_ for the report and `@RonnyPfannschmidt`_ for the PR.
* catch IndexError exceptions when getting exception source location. This fixes * catch IndexError exceptions when getting exception source location. This fixes
pytest internal error for dynamically generated code (fixtures and tests) pytest internal error for dynamically generated code (fixtures and tests)
@@ -91,44 +91,69 @@ The py.test Development Team
`pylib <https://pylib.readthedocs.io/en/stable/>`_. `pylib <https://pylib.readthedocs.io/en/stable/>`_.
* ``pytest_enter_pdb`` now optionally receives the pytest config object. * ``pytest_enter_pdb`` now optionally receives the pytest config object.
Thanks :user:`nicoddemus` for the PR. Thanks `@nicoddemus`_ for the PR.
* Removed code and documentation for Python 2.5 or lower versions, * Removed code and documentation for Python 2.5 or lower versions,
including removal of the obsolete ``_pytest.assertion.oldinterpret`` module. including removal of the obsolete ``_pytest.assertion.oldinterpret`` module.
Thanks :user:`nicoddemus` for the PR (:issue:`1226`). Thanks `@nicoddemus`_ for the PR (`#1226`_).
* Comparisons now always show up in full when ``CI`` or ``BUILD_NUMBER`` is * Comparisons now always show up in full when ``CI`` or ``BUILD_NUMBER`` is
found in the environment, even when -vv isn't used. found in the environment, even when -vv isn't used.
Thanks :user:`The-Compiler` for the PR. Thanks `@The-Compiler`_ for the PR.
* ``--lf`` and ``--ff`` now support long names: ``--last-failed`` and * ``--lf`` and ``--ff`` now support long names: ``--last-failed`` and
``--failed-first`` respectively. ``--failed-first`` respectively.
Thanks :user:`MichaelAquilina` for the PR. Thanks `@MichaelAquilina`_ for the PR.
* Added expected exceptions to pytest.raises fail message * Added expected exceptions to pytest.raises fail message
* Collection only displays progress ("collecting X items") when in a terminal. * Collection only displays progress ("collecting X items") when in a terminal.
This avoids cluttering the output when using ``--color=yes`` to obtain This avoids cluttering the output when using ``--color=yes`` to obtain
colors in CI integrations systems (:issue:`1397`). colors in CI integrations systems (`#1397`_).
**Bug Fixes** **Bug Fixes**
* The ``-s`` and ``-c`` options should now work under ``xdist``; * The ``-s`` and ``-c`` options should now work under ``xdist``;
``Config.fromdictargs`` now represents its input much more faithfully. ``Config.fromdictargs`` now represents its input much more faithfully.
Thanks to :user:`bukzor` for the complete PR (:issue:`680`). Thanks to `@bukzor`_ for the complete PR (`#680`_).
* Fix (:issue:`1290`): support Python 3.5's ``@`` operator in assertion rewriting. * Fix (`#1290`_): support Python 3.5's ``@`` operator in assertion rewriting.
Thanks :user:`Shinkenjoe` for report with test case and :user:`tomviner` for the PR. Thanks `@Shinkenjoe`_ for report with test case and `@tomviner`_ for the PR.
* Fix formatting utf-8 explanation messages (:issue:`1379`). * Fix formatting utf-8 explanation messages (`#1379`_).
Thanks :user:`biern` for the PR. Thanks `@biern`_ for the PR.
* Fix `traceback style docs`_ to describe all of the available options * Fix `traceback style docs`_ to describe all of the available options
(auto/long/short/line/native/no), with ``auto`` being the default since v2.6. (auto/long/short/line/native/no), with ``auto`` being the default since v2.6.
Thanks :user:`hackebrot` for the PR. Thanks `@hackebrot`_ for the PR.
* Fix (:issue:`1422`): junit record_xml_property doesn't allow multiple records * Fix (`#1422`_): junit record_xml_property doesn't allow multiple records
with same name. with same name.
.. _`traceback style docs`: https://pytest.org/en/stable/how-to/output.html#modifying-python-traceback-printing .. _`traceback style docs`: https://pytest.org/en/stable/usage.html#modifying-python-traceback-printing
.. _#1422: https://github.com/pytest-dev/pytest/issues/1422
.. _#1379: https://github.com/pytest-dev/pytest/issues/1379
.. _#1366: https://github.com/pytest-dev/pytest/issues/1366
.. _#1040: https://github.com/pytest-dev/pytest/pull/1040
.. _#680: https://github.com/pytest-dev/pytest/issues/680
.. _#1287: https://github.com/pytest-dev/pytest/pull/1287
.. _#1226: https://github.com/pytest-dev/pytest/pull/1226
.. _#1290: https://github.com/pytest-dev/pytest/pull/1290
.. _#1355: https://github.com/pytest-dev/pytest/pull/1355
.. _#1397: https://github.com/pytest-dev/pytest/issues/1397
.. _@biern: https://github.com/biern
.. _@MichaelAquilina: https://github.com/MichaelAquilina
.. _@bukzor: https://github.com/bukzor
.. _@hpk42: https://github.com/hpk42
.. _@nicoddemus: https://github.com/nicoddemus
.. _@jab: https://github.com/jab
.. _@codewarrior0: https://github.com/codewarrior0
.. _@jaraco: https://github.com/jaraco
.. _@The-Compiler: https://github.com/The-Compiler
.. _@Shinkenjoe: https://github.com/Shinkenjoe
.. _@tomviner: https://github.com/tomviner
.. _@RonnyPfannschmidt: https://github.com/RonnyPfannschmidt
.. _@rabbbit: https://github.com/rabbbit
.. _@hackebrot: https://github.com/hackebrot

View File

@@ -37,21 +37,31 @@ The py.test Development Team
**Bug Fixes** **Bug Fixes**
* Improve error message when a plugin fails to load. * Improve error message when a plugin fails to load.
Thanks :user:`nicoddemus` for the PR. Thanks `@nicoddemus`_ for the PR.
* Fix (:issue:`1178`): * Fix (`#1178 <https://github.com/pytest-dev/pytest/issues/1178>`_):
``pytest.fail`` with non-ascii characters raises an internal pytest error. ``pytest.fail`` with non-ascii characters raises an internal pytest error.
Thanks :user:`nicoddemus` for the PR. Thanks `@nicoddemus`_ for the PR.
* Fix (:issue:`469`): junit parses report.nodeid incorrectly, when params IDs * Fix (`#469`_): junit parses report.nodeid incorrectly, when params IDs
contain ``::``. Thanks :user:`tomviner` for the PR (:pull:`1431`). contain ``::``. Thanks `@tomviner`_ for the PR (`#1431`_).
* Fix (:issue:`578`): SyntaxErrors * Fix (`#578 <https://github.com/pytest-dev/pytest/issues/578>`_): SyntaxErrors
containing non-ascii lines at the point of failure generated an internal containing non-ascii lines at the point of failure generated an internal
py.test error. py.test error.
Thanks :user:`asottile` for the report and :user:`nicoddemus` for the PR. Thanks `@asottile`_ for the report and `@nicoddemus`_ for the PR.
* Fix (:issue:`1437`): When passing in a bytestring regex pattern to parameterize * Fix (`#1437`_): When passing in a bytestring regex pattern to parameterize
attempt to decode it as utf-8 ignoring errors. attempt to decode it as utf-8 ignoring errors.
* Fix (:issue:`649`): parametrized test nodes cannot be specified to run on the command line. * Fix (`#649`_): parametrized test nodes cannot be specified to run on the command line.
.. _#1437: https://github.com/pytest-dev/pytest/issues/1437
.. _#469: https://github.com/pytest-dev/pytest/issues/469
.. _#1431: https://github.com/pytest-dev/pytest/pull/1431
.. _#649: https://github.com/pytest-dev/pytest/issues/649
.. _@asottile: https://github.com/asottile
.. _@nicoddemus: https://github.com/nicoddemus
.. _@tomviner: https://github.com/tomviner

View File

@@ -39,27 +39,40 @@ The py.test Development Team
**Bug Fixes** **Bug Fixes**
* fix :issue:`510`: skip tests where one parameterize dimension was empty * fix `#510`_: skip tests where one parameterize dimension was empty
thanks Alex Stapleton for the Report and :user:`RonnyPfannschmidt` for the PR thanks Alex Stapleton for the Report and `@RonnyPfannschmidt`_ for the PR
* Fix Xfail does not work with condition keyword argument. * Fix Xfail does not work with condition keyword argument.
Thanks :user:`astraw38` for reporting the issue (:issue:`1496`) and :user:`tomviner` Thanks `@astraw38`_ for reporting the issue (`#1496`_) and `@tomviner`_
for PR the (:pull:`1524`). for PR the (`#1524`_).
* Fix win32 path issue when putting custom config file with absolute path * Fix win32 path issue when putting custom config file with absolute path
in ``pytest.main("-c your_absolute_path")``. in ``pytest.main("-c your_absolute_path")``.
* Fix maximum recursion depth detection when raised error class is not aware * Fix maximum recursion depth detection when raised error class is not aware
of unicode/encoded bytes. of unicode/encoded bytes.
Thanks :user:`prusse-martin` for the PR (:pull:`1506`). Thanks `@prusse-martin`_ for the PR (`#1506`_).
* Fix ``pytest.mark.skip`` mark when used in strict mode. * Fix ``pytest.mark.skip`` mark when used in strict mode.
Thanks :user:`pquentin` for the PR and :user:`RonnyPfannschmidt` for Thanks `@pquentin`_ for the PR and `@RonnyPfannschmidt`_ for
showing how to fix the bug. showing how to fix the bug.
* Minor improvements and fixes to the documentation. * Minor improvements and fixes to the documentation.
Thanks :user:`omarkohl` for the PR. Thanks `@omarkohl`_ for the PR.
* Fix ``--fixtures`` to show all fixture definitions as opposed to just * Fix ``--fixtures`` to show all fixture definitions as opposed to just
one per fixture name. one per fixture name.
Thanks to :user:`hackebrot` for the PR. Thanks to `@hackebrot`_ for the PR.
.. _#510: https://github.com/pytest-dev/pytest/issues/510
.. _#1506: https://github.com/pytest-dev/pytest/pull/1506
.. _#1496: https://github.com/pytest-dev/pytest/issues/1496
.. _#1524: https://github.com/pytest-dev/pytest/pull/1524
.. _@astraw38: https://github.com/astraw38
.. _@hackebrot: https://github.com/hackebrot
.. _@omarkohl: https://github.com/omarkohl
.. _@pquentin: https://github.com/pquentin
.. _@prusse-martin: https://github.com/prusse-martin
.. _@RonnyPfannschmidt: https://github.com/RonnyPfannschmidt
.. _@tomviner: https://github.com/tomviner

View File

@@ -1,30 +0,0 @@
pytest-6.2.5
=======================================
pytest 6.2.5 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:
* Anthony Sottile
* Bruno Oliveira
* Brylie Christopher Oxley
* Daniel Asztalos
* Florian Bruhin
* Jason Haugen
* MapleCCC
* Michał Górny
* Miro Hrončok
* Ran Benita
* Ronny Pfannschmidt
* Sylvain Bellemare
* Thomas Güttler
Happy testing,
The pytest Development Team

View File

@@ -1,74 +0,0 @@
pytest-7.0.0
=======================================
The pytest team is proud to announce the 7.0.0 release!
This release contains new features, improvements, bug fixes, and breaking changes, so users
are encouraged to take a look at the CHANGELOG carefully:
https://docs.pytest.org/en/stable/changelog.html
For complete documentation, please visit:
https://docs.pytest.org/en/stable/
As usual, you can upgrade from PyPI via:
pip install -U pytest
Thanks to all of the contributors to this release:
* Adam J. Stewart
* Alexander King
* Amin Alaee
* Andrew Neitsch
* Anthony Sottile
* Ben Davies
* Bernát Gábor
* Brian Okken
* Bruno Oliveira
* Cristian Vera
* Dan Alvizu
* David Szotten
* Eddie
* Emmanuel Arias
* Emmanuel Meric de Bellefon
* Eric Liu
* Florian Bruhin
* GergelyKalmar
* Graeme Smecher
* Harshna
* Hugo van Kemenade
* Jakub Kulík
* James Myatt
* Jeff Rasley
* Kale Kundert
* Kian Meng, Ang
* Miro Hrončok
* Naveen-Pratap
* Oleg Höfling
* Olga Matoula
* Ran Benita
* Ronny Pfannschmidt
* Simon K
* Srip
* Sören Wegener
* Taneli Hukkinen
* Terje Runde
* Thomas Grainger
* Thomas Hisch
* William Jamir Silva
* Yuval Shimon
* Zac Hatfield-Dodds
* andrewdotn
* denivyruck
* ericluoliu
* oleg.hoefling
* symonk
* ziebam
* Éloi Rivard
* Éric
Happy testing,
The pytest Development Team

View File

@@ -1,74 +0,0 @@
pytest-7.0.0rc1
=======================================
The pytest team is proud to announce the 7.0.0rc1 prerelease!
This is a prerelease, not intended for production use, but to test the upcoming features and improvements
in order to catch any major problems before the final version is released to the major public.
We appreciate your help testing this out before the final release, making sure to report any
regressions to our issue tracker:
https://github.com/pytest-dev/pytest/issues
When doing so, please include the string ``[prerelease]`` in the title.
You can upgrade from PyPI via:
pip install pytest==7.0.0rc1
Users are encouraged to take a look at the CHANGELOG carefully:
https://docs.pytest.org/en/7.0.x/changelog.html
Thanks to all the contributors to this release:
* Adam J. Stewart
* Alexander King
* Amin Alaee
* Andrew Neitsch
* Anthony Sottile
* Ben Davies
* Bernát Gábor
* Brian Okken
* Bruno Oliveira
* Cristian Vera
* David Szotten
* Eddie
* Emmanuel Arias
* Emmanuel Meric de Bellefon
* Eric Liu
* Florian Bruhin
* GergelyKalmar
* Graeme Smecher
* Harshna
* Hugo van Kemenade
* Jakub Kulík
* James Myatt
* Jeff Rasley
* Kale Kundert
* Miro Hrončok
* Naveen-Pratap
* Oleg Höfling
* Ran Benita
* Ronny Pfannschmidt
* Simon K
* Srip
* Sören Wegener
* Taneli Hukkinen
* Terje Runde
* Thomas Grainger
* Thomas Hisch
* William Jamir Silva
* Zac Hatfield-Dodds
* andrewdotn
* denivyruck
* ericluoliu
* oleg.hoefling
* symonk
* ziebam
* Éloi Rivard
Happy testing,
The pytest Development Team

View File

@@ -1,20 +0,0 @@
pytest-7.0.1
=======================================
pytest 7.0.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:
* Anthony Sottile
* Bruno Oliveira
* Ran Benita
Happy testing,
The pytest Development Team

View File

@@ -1,48 +0,0 @@
pytest-7.1.0
=======================================
The pytest team is proud to announce the 7.1.0 release!
This release contains new features, improvements, and bug fixes,
the full list of changes is available in the changelog:
https://docs.pytest.org/en/stable/changelog.html
For complete documentation, please visit:
https://docs.pytest.org/en/stable/
As usual, you can upgrade from PyPI via:
pip install -U pytest
Thanks to all of the contributors to this release:
* Akuli
* Andrew Svetlov
* Anthony Sottile
* Brett Holman
* Bruno Oliveira
* Chris NeJame
* Dan Alvizu
* Elijah DeLee
* Emmanuel Arias
* Fabian Egli
* Florian Bruhin
* Gabor Szabo
* Hasan Ramezani
* Hugo van Kemenade
* Kian Meng, Ang
* Kojo Idrissa
* Masaru Tsuchiyama
* Olga Matoula
* P. L. Lim
* Ran Benita
* Tobias Deiminger
* Yuval Shimon
* eduardo naufel schettino
* Éric
Happy testing,
The pytest Development Team

View File

@@ -1,18 +0,0 @@
pytest-7.1.1
=======================================
pytest 7.1.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:
* Ran Benita
Happy testing,
The pytest Development Team

View File

@@ -1,23 +0,0 @@
pytest-7.1.2
=======================================
pytest 7.1.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:
* Anthony Sottile
* Bruno Oliveira
* Hugo van Kemenade
* Kian Eliasi
* Ran Benita
* Zac Hatfield-Dodds
Happy testing,
The pytest Development Team

View File

@@ -1,28 +0,0 @@
pytest-7.1.3
=======================================
pytest 7.1.3 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:
* Anthony Sottile
* Bruno Oliveira
* Gergely Kalmár
* Nipunn Koorapati
* Pax
* Sviatoslav Sydorenko
* Tim Hoffmann
* Tony Narlock
* Wolfremium
* Zach OBrien
* aizpurua23a
Happy testing,
The pytest Development Team

View File

@@ -1,93 +0,0 @@
pytest-7.2.0
=======================================
The pytest team is proud to announce the 7.2.0 release!
This release contains new features, improvements, and bug fixes,
the full list of changes is available in the changelog:
https://docs.pytest.org/en/stable/changelog.html
For complete documentation, please visit:
https://docs.pytest.org/en/stable/
As usual, you can upgrade from PyPI via:
pip install -U pytest
Thanks to all of the contributors to this release:
* Aaron Berdy
* Adam Turner
* Albert Villanova del Moral
* Alice Purcell
* Anthony Sottile
* Anton Yakutovich
* Babak Keyvani
* Brandon Chinn
* Bruno Oliveira
* Chanvin Xiao
* Cheuk Ting Ho
* Chris Wheeler
* EmptyRabbit
* Ezio Melotti
* Florian Best
* Florian Bruhin
* Fredrik Berndtsson
* Gabriel Landau
* Gergely Kalmár
* Hugo van Kemenade
* James Gerity
* John Litborn
* Jon Parise
* Kevin C
* Kian Eliasi
* MatthewFlamm
* Miro Hrončok
* Nate Meyvis
* Neil Girdhar
* Nhieuvu1802
* Nipunn Koorapati
* Ofek Lev
* Paul Müller
* Paul Reece
* Pax
* Pete Baughman
* Peyman Salehi
* Philipp A
* Ran Benita
* Robert O'Shea
* Ronny Pfannschmidt
* Rowin
* Ruth Comer
* Samuel Colvin
* Samuel Gaist
* Sandro Tosi
* Shantanu
* Simon K
* Stephen Rosen
* Sviatoslav Sydorenko
* Tatiana Ovary
* Thierry Moisan
* Thomas Grainger
* Tim Hoffmann
* Tobias Diez
* Tony Narlock
* Vivaan Verma
* Wolfremium
* Zac Hatfield-Dodds
* Zach OBrien
* aizpurua23a
* gresm
* holesch
* itxasos23
* johnkangw
* skhomuti
* sommersoft
* wodny
* zx.qiu
Happy testing,
The pytest Development Team

View File

@@ -1,25 +0,0 @@
pytest-7.2.1
=======================================
pytest 7.2.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:
* Anthony Sottile
* Bruno Oliveira
* Daniel Valenzuela
* Kadino
* Prerak Patel
* Ronny Pfannschmidt
* Santiago Castro
* s-padmanaban
Happy testing,
The pytest Development Team

View File

@@ -1,25 +0,0 @@
pytest-7.2.2
=======================================
pytest 7.2.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
* Garvit Shubham
* Mahesh Vashishtha
* Ramsey
* Ronny Pfannschmidt
* Teejay
* q0w
* vin01
Happy testing,
The pytest Development Team

View File

@@ -1,130 +0,0 @@
pytest-7.3.0
=======================================
The pytest team is proud to announce the 7.3.0 release!
This release contains new features, improvements, and bug fixes,
the full list of changes is available in the changelog:
https://docs.pytest.org/en/stable/changelog.html
For complete documentation, please visit:
https://docs.pytest.org/en/stable/
As usual, you can upgrade from PyPI via:
pip install -U pytest
Thanks to all of the contributors to this release:
* Aaron Berdy
* Adam Turner
* Albert Villanova del Moral
* Alessio Izzo
* Alex Hadley
* Alice Purcell
* Anthony Sottile
* Anton Yakutovich
* Ashish Kurmi
* Babak Keyvani
* Billy
* Brandon Chinn
* Bruno Oliveira
* Cal Jacobson
* Chanvin Xiao
* Cheuk Ting Ho
* Chris Wheeler
* Daniel Garcia Moreno
* Daniel Scheffler
* Daniel Valenzuela
* EmptyRabbit
* Ezio Melotti
* Felix Hofstätter
* Florian Best
* Florian Bruhin
* Fredrik Berndtsson
* Gabriel Landau
* Garvit Shubham
* Gergely Kalmár
* HTRafal
* Hugo van Kemenade
* Ilya Konstantinov
* Itxaso Aizpurua
* James Gerity
* Jay
* John Litborn
* Jon Parise
* Jouke Witteveen
* Kadino
* Kevin C
* Kian Eliasi
* Klaus Rettinghaus
* Kodi Arfer
* Mahesh Vashishtha
* Manuel Jacob
* Marko Pacak
* MatthewFlamm
* Miro Hrončok
* Nate Meyvis
* Neil Girdhar
* Nhieuvu1802
* Nipunn Koorapati
* Ofek Lev
* Paul Kehrer
* Paul Müller
* Paul Reece
* Pax
* Pete Baughman
* Peyman Salehi
* Philipp A
* Pierre Sassoulas
* Prerak Patel
* Ramsey
* Ran Benita
* Robert O'Shea
* Ronny Pfannschmidt
* Rowin
* Ruth Comer
* Samuel Colvin
* Samuel Gaist
* Sandro Tosi
* Santiago Castro
* Shantanu
* Simon K
* Stefanie Molin
* Stephen Rosen
* Sviatoslav Sydorenko
* Tatiana Ovary
* Teejay
* Thierry Moisan
* Thomas Grainger
* Tim Hoffmann
* Tobias Diez
* Tony Narlock
* Vivaan Verma
* Wolfremium
* Yannick PÉROUX
* Yusuke Kadowaki
* Zac Hatfield-Dodds
* Zach OBrien
* aizpurua23a
* bitzge
* bluthej
* gresm
* holesch
* itxasos23
* johnkangw
* q0w
* rdb
* s-padmanaban
* skhomuti
* sommersoft
* vin01
* wim glenn
* wodny
* zx.qiu
Happy testing,
The pytest Development Team

View File

@@ -1,18 +0,0 @@
pytest-7.3.1
=======================================
pytest 7.3.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:
* Ran Benita
Happy testing,
The pytest Development Team

View File

@@ -1,21 +0,0 @@
pytest-7.3.2
=======================================
pytest 7.3.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:
* Adam J. Stewart
* Alessio Izzo
* Bruno Oliveira
* Ran Benita
Happy testing,
The pytest Development Team

View File

@@ -22,9 +22,7 @@ b) transitional: the old and new API don't conflict
We will only start the removal of deprecated functionality in major releases (e.g. if we deprecate something in 3.0 we will start to remove it in 4.0), and keep it around for at least two minor releases (e.g. if we deprecate something in 3.9 and 4.0 is the next release, we start to remove it in 5.0, not in 4.0). We will only start the removal of deprecated functionality in major releases (e.g. if we deprecate something in 3.0 we will start to remove it in 4.0), and keep it around for at least two minor releases (e.g. if we deprecate something in 3.9 and 4.0 is the next release, we start to remove it in 5.0, not in 4.0).
A deprecated feature scheduled to be removed in major version X will use the warning class `PytestRemovedInXWarning` (a subclass of :class:`~pytest.PytestDeprecationwarning`). When the deprecation expires (e.g. 4.0 is released), we won't remove the deprecated functionality immediately, but will use the standard warning filters to turn them into **errors** by default. This approach makes it explicit that removal is imminent, and still gives you time to turn the deprecated feature into a warning instead of an error so it can be dealt with in your own time. In the next minor release (e.g. 4.1), the feature will be effectively removed.
When the deprecation expires (e.g. 4.0 is released), we won't remove the deprecated functionality immediately, but will use the standard warning filters to turn `PytestRemovedInXWarning` (e.g. `PytestRemovedIn4Warning`) into **errors** by default. This approach makes it explicit that removal is imminent, and still gives you time to turn the deprecated feature into a warning instead of an error so it can be dealt with in your own time. In the next minor release (e.g. 4.1), the feature will be effectively removed.
c) true breakage: should only be considered when normal transition is unreasonably unsustainable and would offset important development/features by years. c) true breakage: should only be considered when normal transition is unreasonably unsustainable and would offset important development/features by years.
@@ -32,15 +30,15 @@ c) true breakage: should only be considered when normal transition is unreasonab
Examples for such upcoming changes: Examples for such upcoming changes:
* removal of ``pytest_runtest_protocol/nextitem`` - :issue:`895` * removal of ``pytest_runtest_protocol/nextitem`` - `#895`_
* rearranging of the node tree to include ``FunctionDefinition`` * rearranging of the node tree to include ``FunctionDefinition``
* rearranging of ``SetupState`` :issue:`895` * rearranging of ``SetupState`` `#895`_
True breakages must be announced first in an issue containing: True breakages must be announced first in an issue containing:
* Detailed description of the change * Detailed description of the change
* Rationale * Rationale
* Expected impact on users and plugin authors (example in :issue:`895`) * Expected impact on users and plugin authors (example in `#895`_)
After there's no hard *-1* on the issue it should be followed up by an initial proof-of-concept Pull Request. After there's no hard *-1* on the issue it should be followed up by an initial proof-of-concept Pull Request.
@@ -79,18 +77,4 @@ Features currently deprecated and removed in previous releases can be found in :
We track future deprecation and removal of features using milestones and the `deprecation <https://github.com/pytest-dev/pytest/issues?q=label%3A%22type%3A+deprecation%22>`_ and `removal <https://github.com/pytest-dev/pytest/labels/type%3A%20removal>`_ labels on GitHub. We track future deprecation and removal of features using milestones and the `deprecation <https://github.com/pytest-dev/pytest/issues?q=label%3A%22type%3A+deprecation%22>`_ and `removal <https://github.com/pytest-dev/pytest/labels/type%3A%20removal>`_ labels on GitHub.
Python version support .. _`#895`: https://github.com/pytest-dev/pytest/issues/895
======================
Released pytest versions support all Python versions that are actively maintained at the time of the release:
============== ===================
pytest version min. Python version
============== ===================
7.1+ 3.7+
6.2 - 7.0 3.6+
5.0 - 6.1 3.5+
3.3 - 4.6 2.7, 3.4+
============== ===================
`Status of Python Versions <https://devguide.python.org/versions/>`__.

View File

@@ -16,13 +16,8 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
.. code-block:: pytest .. code-block:: pytest
$ pytest --fixtures -v $ pytest -q --fixtures
=========================== test session starts ============================ cache
platform linux -- Python 3.x.y, pytest-7.x.y, pluggy-1.x.y -- $PYTHON_PREFIX/bin/python
cachedir: .pytest_cache
rootdir: /home/sweet/project
collected 0 items
cache -- .../_pytest/cacheprovider.py:510
Return a cache object that can persist state between testing sessions. Return a cache object that can persist state between testing sessions.
cache.get(key, default) cache.get(key, default)
@@ -33,95 +28,40 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
Values can be any object handled by the json stdlib module. Values can be any object handled by the json stdlib module.
capsysbinary -- .../_pytest/capture.py:1001 capsys
Enable bytes capturing of writes to ``sys.stdout`` and ``sys.stderr``.
The captured output is made available via ``capsysbinary.readouterr()``
method calls, which return a ``(out, err)`` namedtuple.
``out`` and ``err`` will be ``bytes`` objects.
Returns an instance of :class:`CaptureFixture[bytes] <pytest.CaptureFixture>`.
Example:
.. code-block:: python
def test_output(capsysbinary):
print("hello")
captured = capsysbinary.readouterr()
assert captured.out == b"hello\n"
capfd -- .../_pytest/capture.py:1029
Enable text capturing of writes to file descriptors ``1`` and ``2``.
The captured output is made available via ``capfd.readouterr()`` method
calls, which return a ``(out, err)`` namedtuple.
``out`` and ``err`` will be ``text`` objects.
Returns an instance of :class:`CaptureFixture[str] <pytest.CaptureFixture>`.
Example:
.. code-block:: python
def test_system_echo(capfd):
os.system('echo "hello"')
captured = capfd.readouterr()
assert captured.out == "hello\n"
capfdbinary -- .../_pytest/capture.py:1057
Enable bytes capturing of writes to file descriptors ``1`` and ``2``.
The captured output is made available via ``capfd.readouterr()`` method
calls, which return a ``(out, err)`` namedtuple.
``out`` and ``err`` will be ``byte`` objects.
Returns an instance of :class:`CaptureFixture[bytes] <pytest.CaptureFixture>`.
Example:
.. code-block:: python
def test_system_echo(capfdbinary):
os.system('echo "hello"')
captured = capfdbinary.readouterr()
assert captured.out == b"hello\n"
capsys -- .../_pytest/capture.py:973
Enable text capturing of writes to ``sys.stdout`` and ``sys.stderr``. Enable text capturing of writes to ``sys.stdout`` and ``sys.stderr``.
The captured output is made available via ``capsys.readouterr()`` method The captured output is made available via ``capsys.readouterr()`` method
calls, which return a ``(out, err)`` namedtuple. calls, which return a ``(out, err)`` namedtuple.
``out`` and ``err`` will be ``text`` objects. ``out`` and ``err`` will be ``text`` objects.
Returns an instance of :class:`CaptureFixture[str] <pytest.CaptureFixture>`. capsysbinary
Enable bytes capturing of writes to ``sys.stdout`` and ``sys.stderr``.
Example: The captured output is made available via ``capsysbinary.readouterr()``
method calls, which return a ``(out, err)`` namedtuple.
``out`` and ``err`` will be ``bytes`` objects.
.. code-block:: python capfd
Enable text capturing of writes to file descriptors ``1`` and ``2``.
def test_output(capsys): The captured output is made available via ``capfd.readouterr()`` method
print("hello") calls, which return a ``(out, err)`` namedtuple.
captured = capsys.readouterr() ``out`` and ``err`` will be ``text`` objects.
assert captured.out == "hello\n"
doctest_namespace [session scope] -- .../_pytest/doctest.py:737 capfdbinary
Enable bytes capturing of writes to file descriptors ``1`` and ``2``.
The captured output is made available via ``capfd.readouterr()`` method
calls, which return a ``(out, err)`` namedtuple.
``out`` and ``err`` will be ``byte`` objects.
doctest_namespace [session scope]
Fixture that returns a :py:class:`dict` that will be injected into the Fixture that returns a :py:class:`dict` that will be injected into the
namespace of doctests. namespace of doctests.
Usually this fixture is used in conjunction with another ``autouse`` fixture: pytestconfig [session scope]
Session-scoped fixture that returns the :class:`pytest.Config` object.
.. code-block:: python
@pytest.fixture(autouse=True)
def add_np(doctest_namespace):
doctest_namespace["np"] = numpy
For more details: :ref:`doctest_namespace`.
pytestconfig [session scope] -- .../_pytest/fixtures.py:1360
Session-scoped fixture that returns the session's :class:`pytest.Config`
object.
Example:: Example::
@@ -129,7 +69,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
if pytestconfig.getoption("verbose") > 0: if pytestconfig.getoption("verbose") > 0:
... ...
record_property -- .../_pytest/junitxml.py:282 record_property
Add extra properties to the calling test. Add extra properties to the calling test.
User properties become part of the test report and are available to the User properties become part of the test report and are available to the
@@ -143,13 +83,13 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
def test_function(record_property): def test_function(record_property):
record_property("example_key", 1) record_property("example_key", 1)
record_xml_attribute -- .../_pytest/junitxml.py:305 record_xml_attribute
Add extra xml attributes to the tag for the calling test. Add extra xml attributes to the tag for the calling test.
The fixture is callable with ``name, value``. The value is The fixture is callable with ``name, value``. The value is
automatically XML-encoded. automatically XML-encoded.
record_testsuite_property [session scope] -- .../_pytest/junitxml.py:343 record_testsuite_property [session scope]
Record a new ``<property>`` tag as child of the root ``<testsuite>``. Record a new ``<property>`` tag as child of the root ``<testsuite>``.
This is suitable to writing global information regarding the entire test This is suitable to writing global information regarding the entire test
@@ -163,40 +103,15 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
record_testsuite_property("ARCH", "PPC") record_testsuite_property("ARCH", "PPC")
record_testsuite_property("STORAGE_TYPE", "CEPH") record_testsuite_property("STORAGE_TYPE", "CEPH")
:param name: ``name`` must be a string, ``value`` will be converted to a string and properly xml-escaped.
The property name.
:param value:
The property value. Will be converted to a string.
.. warning:: .. warning::
Currently this fixture **does not work** with the Currently this fixture **does not work** with the
`pytest-xdist <https://github.com/pytest-dev/pytest-xdist>`__ plugin. See `pytest-xdist <https://github.com/pytest-dev/pytest-xdist>`__ plugin. See issue
:issue:`7767` for details. `#7767 <https://github.com/pytest-dev/pytest/issues/7767>`__ for details.
tmpdir_factory [session scope] -- .../_pytest/legacypath.py:302 caplog
Return a :class:`pytest.TempdirFactory` instance for the test session.
tmpdir -- .../_pytest/legacypath.py:309
Return a temporary directory path object which is unique to each test
function invocation, created as a sub directory of the base temporary
directory.
By default, a new base temporary directory is created each test session,
and old bases are removed after 3 sessions, to aid in debugging. If
``--basetemp`` is used then it is cleared each session. See :ref:`base
temporary directory`.
The returned object is a `legacy_path`_ object.
.. note::
These days, it is preferred to use ``tmp_path``.
:ref:`About the tmpdir and tmpdir_factory fixtures<tmpdir and tmpdir_factory>`.
.. _legacy_path: https://py.readthedocs.io/en/latest/path.html
caplog -- .../_pytest/logging.py:498
Access and control log capturing. Access and control log capturing.
Captured logs are available through the following properties/methods:: Captured logs are available through the following properties/methods::
@@ -207,55 +122,65 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
* caplog.record_tuples -> list of (logger_name, level, message) tuples * caplog.record_tuples -> list of (logger_name, level, message) tuples
* caplog.clear() -> clear captured records and formatted log output string * caplog.clear() -> clear captured records and formatted log output string
monkeypatch -- .../_pytest/monkeypatch.py:30 monkeypatch
A convenient fixture for monkey-patching. A convenient fixture for monkey-patching.
The fixture provides these methods to modify objects, dictionaries, or The fixture provides these methods to modify objects, dictionaries or
:data:`os.environ`: os.environ::
* :meth:`monkeypatch.setattr(obj, name, value, raising=True) <pytest.MonkeyPatch.setattr>` monkeypatch.setattr(obj, name, value, raising=True)
* :meth:`monkeypatch.delattr(obj, name, raising=True) <pytest.MonkeyPatch.delattr>` monkeypatch.delattr(obj, name, raising=True)
* :meth:`monkeypatch.setitem(mapping, name, value) <pytest.MonkeyPatch.setitem>` monkeypatch.setitem(mapping, name, value)
* :meth:`monkeypatch.delitem(obj, name, raising=True) <pytest.MonkeyPatch.delitem>` monkeypatch.delitem(obj, name, raising=True)
* :meth:`monkeypatch.setenv(name, value, prepend=None) <pytest.MonkeyPatch.setenv>` monkeypatch.setenv(name, value, prepend=False)
* :meth:`monkeypatch.delenv(name, raising=True) <pytest.MonkeyPatch.delenv>` monkeypatch.delenv(name, raising=True)
* :meth:`monkeypatch.syspath_prepend(path) <pytest.MonkeyPatch.syspath_prepend>` monkeypatch.syspath_prepend(path)
* :meth:`monkeypatch.chdir(path) <pytest.MonkeyPatch.chdir>` monkeypatch.chdir(path)
* :meth:`monkeypatch.context() <pytest.MonkeyPatch.context>`
All modifications will be undone after the requesting test function or All modifications will be undone after the requesting test function or
fixture has finished. The ``raising`` parameter determines if a :class:`KeyError` fixture has finished. The ``raising`` parameter determines if a KeyError
or :class:`AttributeError` will be raised if the set/deletion operation does not have the or AttributeError will be raised if the set/deletion operation has no target.
specified target.
To undo modifications done by the fixture in a contained scope, recwarn
use :meth:`context() <pytest.MonkeyPatch.context>`.
recwarn -- .../_pytest/recwarn.py:30
Return a :class:`WarningsRecorder` instance that records all warnings emitted by test functions. Return a :class:`WarningsRecorder` instance that records all warnings emitted by test functions.
See https://docs.pytest.org/en/latest/how-to/capture-warnings.html for information See https://docs.python.org/library/warnings.html for information
on warning categories. on warning categories.
tmp_path_factory [session scope] -- .../_pytest/tmpdir.py:245 tmpdir_factory [session scope]
Return a :class:`pytest.TempdirFactory` instance for the test session.
tmp_path_factory [session scope]
Return a :class:`pytest.TempPathFactory` instance for the test session. Return a :class:`pytest.TempPathFactory` instance for the test session.
tmp_path -- .../_pytest/tmpdir.py:260 tmpdir
Return a temporary directory path object which is unique to each test Return a temporary directory path object which is unique to each test
function invocation, created as a sub directory of the base temporary function invocation, created as a sub directory of the base temporary
directory. directory.
By default, a new base temporary directory is created each test session, By default, a new base temporary directory is created each test session,
and old bases are removed after 3 sessions, to aid in debugging. and old bases are removed after 3 sessions, to aid in debugging. If
This behavior can be configured with :confval:`tmp_path_retention_count` and ``--basetemp`` is used then it is cleared each session. See :ref:`base
:confval:`tmp_path_retention_policy`. temporary directory`.
If ``--basetemp`` is used then it is cleared each session. See :ref:`base
The returned object is a `py.path.local`_ path object.
.. _`py.path.local`: https://py.readthedocs.io/en/latest/path.html
tmp_path
Return a temporary directory path object which is unique to each test
function invocation, created as a sub directory of the base temporary
directory.
By default, a new base temporary directory is created each test session,
and old bases are removed after 3 sessions, to aid in debugging. If
``--basetemp`` is used then it is cleared each session. See :ref:`base
temporary directory`. temporary directory`.
The returned object is a :class:`pathlib.Path` object. The returned object is a :class:`pathlib.Path` object.
========================== no tests ran in 0.12s =========================== no tests ran in 0.12s
You can also interactively ask for help, e.g. by typing on the Python interactive prompt something like: You can also interactively ask for help, e.g. by typing on the Python interactive prompt something like:

File diff suppressed because it is too large Load Diff

View File

@@ -17,9 +17,7 @@
# The short X.Y version. # The short X.Y version.
import ast import ast
import os import os
import shutil
import sys import sys
from textwrap import dedent
from typing import List from typing import List
from typing import TYPE_CHECKING from typing import TYPE_CHECKING
@@ -38,26 +36,8 @@ release = ".".join(version.split(".")[:2])
autodoc_member_order = "bysource" autodoc_member_order = "bysource"
autodoc_typehints = "description" autodoc_typehints = "description"
autodoc_typehints_description_target = "documented"
todo_include_todos = 1 todo_include_todos = 1
latex_engine = "lualatex"
latex_elements = {
"preamble": dedent(
r"""
\directlua{
luaotfload.add_fallback("fallbacks", {
"Noto Serif CJK SC:style=Regular;",
"Symbola:Style=Regular;"
})
}
\setmainfont{FreeSerif}[RawFeature={fallback=fallbacks}]
"""
)
}
# -- General configuration ----------------------------------------------------- # -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here. # If your documentation needs a minimal Sphinx version, state it here.
@@ -70,7 +50,6 @@ extensions = [
"pygments_pytest", "pygments_pytest",
"sphinx.ext.autodoc", "sphinx.ext.autodoc",
"sphinx.ext.autosummary", "sphinx.ext.autosummary",
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx", "sphinx.ext.intersphinx",
"sphinx.ext.todo", "sphinx.ext.todo",
"sphinx.ext.viewcode", "sphinx.ext.viewcode",
@@ -78,13 +57,6 @@ extensions = [
"sphinxcontrib_trio", "sphinxcontrib_trio",
] ]
# Building PDF docs on readthedocs requires inkscape for svg to pdf
# conversion. The relevant plugin is not useful for normal HTML builds, but
# it still raises warnings and fails CI if inkscape is not available. So
# only use the plugin if inkscape is actually available.
if shutil.which("inkscape"):
extensions.append("sphinxcontrib.inkscapeconverter")
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"] templates_path = ["_templates"]
@@ -99,7 +71,7 @@ master_doc = "contents"
# General information about the project. # General information about the project.
project = "pytest" project = "pytest"
copyright = "2015, holger krekel and pytest-dev team" copyright = "20152021, holger krekel and pytest-dev team"
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
@@ -151,6 +123,7 @@ pygments_style = "sphinx"
# A list of regular expressions that match URIs that should not be checked when # A list of regular expressions that match URIs that should not be checked when
# doing a linkcheck. # doing a linkcheck.
linkcheck_ignore = [ linkcheck_ignore = [
"https://github.com/numpy/numpy/blob/master/doc/release/1.16.0-notes.rst#new-deprecations",
"https://blogs.msdn.microsoft.com/bharry/2017/06/28/testing-in-a-cloud-delivery-cadence/", "https://blogs.msdn.microsoft.com/bharry/2017/06/28/testing-in-a-cloud-delivery-cadence/",
"http://pythontesting.net/framework/pytest-introduction/", "http://pythontesting.net/framework/pytest-introduction/",
r"https://github.com/pytest-dev/pytest/issues/\d+", r"https://github.com/pytest-dev/pytest/issues/\d+",
@@ -161,16 +134,6 @@ linkcheck_ignore = [
linkcheck_workers = 5 linkcheck_workers = 5
_repo = "https://github.com/pytest-dev/pytest"
extlinks = {
"bpo": ("https://bugs.python.org/issue%s", "bpo-%s"),
"pypi": ("https://pypi.org/project/%s/", "%s"),
"issue": (f"{_repo}/issues/%s", "issue #%s"),
"pull": (f"{_repo}/pull/%s", "pull request #%s"),
"user": ("https://github.com/%s", "@%s"),
}
# -- Options for HTML output --------------------------------------------------- # -- Options for HTML output ---------------------------------------------------
sys.path.append(os.path.abspath("_themes")) sys.path.append(os.path.abspath("_themes"))
@@ -248,7 +211,7 @@ html_sidebars = {
html_domain_indices = True html_domain_indices = True
# If false, no index is generated. # If false, no index is generated.
html_use_index = False html_use_index = True
# If true, the index is split into individual pages for each letter. # If true, the index is split into individual pages for each letter.
# html_split_index = False # html_split_index = False
@@ -321,9 +284,7 @@ latex_domain_indices = False
# One entry per manual page. List of tuples # One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section). # (source start file, name, description, authors, manual section).
man_pages = [ man_pages = [("usage", "pytest", "pytest usage", ["holger krekel at merlinux eu"], 1)]
("how-to/usage", "pytest", "pytest usage", ["holger krekel at merlinux eu"], 1)
]
# -- Options for Epub output --------------------------------------------------- # -- Options for Epub output ---------------------------------------------------
@@ -332,7 +293,7 @@ man_pages = [
epub_title = "pytest" epub_title = "pytest"
epub_author = "holger krekel at merlinux eu" epub_author = "holger krekel at merlinux eu"
epub_publisher = "holger krekel at merlinux eu" epub_publisher = "holger krekel at merlinux eu"
epub_copyright = "2013, holger krekel et alii" epub_copyright = "2013-2021, holger krekel et alii"
# The language of the text. It defaults to the language option # The language of the text. It defaults to the language option
# or en if the language is not set. # or en if the language is not set.
@@ -341,7 +302,7 @@ epub_copyright = "2013, holger krekel et alii"
# The scheme of the identifier. Typical schemes are ISBN or URL. # The scheme of the identifier. Typical schemes are ISBN or URL.
# epub_scheme = '' # epub_scheme = ''
# The unique identifier of the text. This can be an ISBN number # The unique identifier of the text. This can be a ISBN number
# or the project homepage. # or the project homepage.
# epub_identifier = '' # epub_identifier = ''
@@ -385,15 +346,10 @@ texinfo_documents = [
] ]
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = { intersphinx_mapping = {
"pluggy": ("https://pluggy.readthedocs.io/en/stable", None), "pluggy": ("https://pluggy.readthedocs.io/en/latest", None),
"python": ("https://docs.python.org/3", None), "python": ("https://docs.python.org/3", None),
"numpy": ("https://numpy.org/doc/stable", None),
"pip": ("https://pip.pypa.io/en/stable", None),
"tox": ("https://tox.wiki/en/stable", None),
"virtualenv": ("https://virtualenv.pypa.io/en/stable", None),
"setuptools": ("https://setuptools.pypa.io/en/stable", None),
"packaging": ("https://packaging.python.org/en/latest", None),
} }
@@ -421,6 +377,8 @@ def configure_logging(app: "sphinx.application.Sphinx") -> None:
def setup(app: "sphinx.application.Sphinx") -> None: def setup(app: "sphinx.application.Sphinx") -> None:
# from sphinx.ext.autodoc import cut_lines
# app.connect('autodoc-process-docstring', cut_lines(4, what=['module']))
app.add_crossref_type( app.add_crossref_type(
"fixture", "fixture",
"fixture", "fixture",
@@ -442,13 +400,6 @@ def setup(app: "sphinx.application.Sphinx") -> None:
indextemplate="pair: %s; global variable interpreted by pytest", indextemplate="pair: %s; global variable interpreted by pytest",
) )
app.add_crossref_type(
directivename="hook",
rolename="hook",
objname="pytest hook",
indextemplate="pair: %s; hook",
)
configure_logging(app) configure_logging(app)
# Make Sphinx mark classes with "final" when decorated with @final. # Make Sphinx mark classes with "final" when decorated with @final.
@@ -469,7 +420,3 @@ def setup(app: "sphinx.application.Sphinx") -> None:
) )
sphinx.pycode.parser.VariableCommentPicker.is_final = patched_is_final sphinx.pycode.parser.VariableCommentPicker.is_final = patched_is_final
# legacypath.py monkey-patches pytest.Testdir in. Import the file so
# that autodoc can discover references to it.
import _pytest.legacypath # noqa: F401

View File

@@ -7,11 +7,9 @@ Contact channels
- `pytest issue tracker`_ to report bugs or suggest features (for version - `pytest issue tracker`_ to report bugs or suggest features (for version
2.0 and above). 2.0 and above).
- `pytest discussions`_ at github for general questions.
- `pytest discord server <https://discord.com/invite/pytest-dev>`_
for pytest development visibility and general assistance.
- `pytest on stackoverflow.com <http://stackoverflow.com/search?q=pytest>`_ - `pytest on stackoverflow.com <http://stackoverflow.com/search?q=pytest>`_
to post precise questions with the tag ``pytest``. New Questions will usually to post questions with the tag ``pytest``. New Questions will usually
be seen by pytest users or developers and answered quickly. be seen by pytest users or developers and answered quickly.
- `Testing In Python`_: a mailing list for Python testing tools and discussion. - `Testing In Python`_: a mailing list for Python testing tools and discussion.
@@ -35,8 +33,6 @@ Contact channels
.. _`pytest issue tracker`: https://github.com/pytest-dev/pytest/issues .. _`pytest issue tracker`: https://github.com/pytest-dev/pytest/issues
.. _`old issue tracker`: https://bitbucket.org/hpk42/py-trunk/issues/ .. _`old issue tracker`: https://bitbucket.org/hpk42/py-trunk/issues/
.. _`pytest discussions`: https://github.com/pytest-dev/pytest/discussions
.. _`merlinux.eu`: https://merlinux.eu/ .. _`merlinux.eu`: https://merlinux.eu/
.. _`get an account`: .. _`get an account`:

View File

@@ -28,7 +28,7 @@ How-to guides
how-to/fixtures how-to/fixtures
how-to/mark how-to/mark
how-to/parametrize how-to/parametrize
how-to/tmp_path how-to/tmpdir
how-to/monkeypatch how-to/monkeypatch
how-to/doctest how-to/doctest
how-to/cache how-to/cache
@@ -85,6 +85,7 @@ Further topics
backwards-compatibility backwards-compatibility
deprecations deprecations
py27-py34-deprecation
contributing contributing
development_guide development_guide
@@ -94,9 +95,9 @@ Further topics
license license
contact contact
history
historical-notes historical-notes
talks talks
projects
.. only:: html .. only:: html

Some files were not shown because too many files have changed in this diff Show More