Compare commits

..

40 Commits
main ... 6.0.x

Author SHA1 Message Date
Bruno Oliveira e886b170dd
Merge pull request #7785 from nicoddemus/backport-7784
[6.0.x] Merge pull request #7784 from nicoddemus/use-new-pip-solver-7783
2020-09-23 09:39:07 -03:00
Bruno Oliveira 45a645db86 Merge pull request #7784 from nicoddemus/use-new-pip-solver-7783
Use new pip resolver in plugins tox env
2020-09-23 09:32:32 -03:00
Bruno Oliveira f5b1f44317
Merge pull request #7776 from nicoddemus/backport-7772
[6.0.x] Add docs about reusing fixtures from other projects (#7772)
2020-09-19 16:13:35 -03:00
Bruno Oliveira 89d03b2999
Merge pull request #7775 from nicoddemus/backport-7721
[6.0.x] Smoke tests for assorted plugins (#7721)
2020-09-19 16:12:09 -03:00
Bruno Oliveira 5e14e7d9c1 Add docs about reusing fixtures from other projects (#7772)
Co-authored-by: Ran Benita <ran@unusedvar.com>
2020-09-19 16:11:01 -03:00
Sorin Sbarnea 5819cb611e Smoke tests for assorted plugins (#7721)
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2020-09-19 15:59:07 -03:00
Ran Benita 687146e3f1
Merge pull request #7774 from bluetech/backport-7773
[6.0.x] Warning about record_testsuite_property not working with xdist
2020-09-19 21:39:48 +03:00
Ran Benita ae61fa4040 Merge pull request #7773 from nicoddemus/xml-properties-xdist-docs
Warning about record_testsuite_property not working with xdist

(cherry picked from commit 4e460cdd9e)
2020-09-19 21:20:40 +03:00
Bruno Oliveira d7d089469e
Merge pull request #7771 from nicoddemus/backport-7749
[6.0.x] Merge pull request #7749 from bluetech/fix-get_source-crash
2020-09-19 10:51:22 -03:00
Bruno Oliveira 6933bf6b4d Merge pull request #7749 from bluetech/fix-get_source-crash 2020-09-19 10:39:05 -03:00
Bruno Oliveira 819fef87a7
Merge pull request #7765 from nicoddemus/backport-7723
[6.0] Improve output for missing required plugins #7723
2020-09-17 10:08:38 -03:00
Sorin Sbarnea 604047ee1a Improve output for missing required plugins/unknown config keys (#7723)
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2020-09-17 09:53:18 -03:00
Bruno Oliveira 52363fe560
Merge pull request #7756 from nicoddemus/backport-7747
[6.0] Add full command-line flags to the reference docs
2020-09-14 13:51:32 -03:00
Bruno Oliveira c923dbc96f Merge pull request #7747 from nicoddemus/cmdline-flags-docs
Add full command-line flags to the reference docs
2020-09-14 13:48:13 -03:00
Bruno Oliveira 2d680da78b
Merge pull request #7746 from nicoddemus/backport-7745
[6.0] Merge pull request #7745 from asottile/exec_globals_type_problem
2020-09-12 08:28:37 -03:00
Bruno Oliveira b3c444ddc1 Merge pull request #7745 from asottile/exec_globals_type_problem
Fix INTERNALERROR when accessing locals / globals with faulty `exec`
2020-09-12 08:10:34 -03:00
Ran Benita fe69bd5baf
Merge pull request #7720 from pytest-dev/release-6.0.2
Prepare release 6.0.2
2020-09-12 02:03:10 +03:00
pytest bot 09b1d7cc99 Prepare release version 6.0.2 2020-09-04 21:48:44 +00:00
Ran Benita ea65ea877e
Merge pull request #7717 from bluetech/backport-7614
[6.0.x] Properly remove log_print
2020-09-04 21:53:05 +03:00
Ran Benita f4f30d7073
Merge pull request #7716 from bluetech/backport-7697
[6.0.x] Add missing File reference to the docs
2020-09-04 21:52:51 +03:00
Ran Benita 309810ac2c
Merge pull request #7715 from bluetech/backport-7651
[6.0.x] capture: fix disabled()/global_and_fixture_disabled() enabling capturing when it was disabled
2020-09-04 21:52:29 +03:00
Bruno Oliveira e63fac3aec Merge pull request #7614 from The-Compiler/log-print
Properly remove log_print

(cherry picked from commit d688fefecb)
2020-09-04 21:28:41 +03:00
Bruno Oliveira cb91c5033e Merge pull request #7697 from nicoddemus/file-docs
(cherry picked from commit 21aa6c42b7)
2020-09-04 21:23:53 +03:00
Ran Benita 9a879ee23e Merge pull request #7651 from bluetech/capture-safe-disable
capture: fix disabled()/global_and_fixture_disabled() enabling capturing when it was disabled

(cherry picked from commit bb38ae9c52)
2020-09-04 21:16:07 +03:00
Bruno Oliveira e9d18bd8ac
Merge pull request #7711 from nicoddemus/backport-7708
[6.0] Merge pull request #7708 from nicoddemus/repr-line-7707
2020-09-04 12:41:17 -03:00
Bruno Oliveira 912870d33e Merge pull request #7708 from nicoddemus/repr-line-7707
Fix handle of exceptions in ReprEntry with tb=line
2020-09-04 12:06:38 -03:00
Bruno Oliveira 0115b716c0
Merge pull request #7688 from nicoddemus/backport-7687 2020-08-25 21:23:41 -03:00
Bruno Oliveira 9a91b67eeb Merge pull request #7687 from bluetech/idval-notset
python: fix empty parametrize() leading to "NotSetType.token" id
2020-08-25 19:57:06 -03:00
Ran Benita 79d0d3eff4
Merge pull request #7676 from bluetech/backport-7673
[6.0.x] logging: fix handler level restored incorrectly if caplog.set_level is called more than once
2020-08-23 12:24:50 +03:00
Ran Benita 834f55eddb Merge pull request #7673 from bluetech/logging-fix-handler-restore
logging: fix handler level restored incorrectly if caplog.set_level is called more than once
(cherry picked from commit 143e3ab846)
2020-08-23 12:07:24 +03:00
Bruno Oliveira 6110f84f78
Merge pull request #7588 from nicoddemus/backport-7557
Merge pull request #7557 from nicoddemus/announce-templates
2020-07-30 12:07:53 -03:00
Bruno Oliveira 5a339f0d74 Merge pull request #7557 from nicoddemus/announce-templates
(cherry picked from commit c7216ae0f6)
2020-07-30 12:04:36 -03:00
Bruno Oliveira 022bff27a7
Merge pull request #7584 from pytest-dev/release-6.0.1
Prepare release 6.0.1
2020-07-30 09:45:40 -03:00
pytest bot 92af2e22d2 Prepare release version 6.0.1 2020-07-30 11:50:12 +00:00
Ran Benita 0307213254
Merge pull request #7582 from bluetech/backport-7581
[6.0.x] Add missing changelog for issue 7569
2020-07-30 14:19:29 +03:00
Ran Benita df7b26704d Merge pull request #7581 from bluetech/logging-setlevel-handler-restore
Add missing changelog for issue 7569

(cherry picked from commit 645cbc91fc)
2020-07-30 13:41:54 +03:00
Bruno Oliveira 1516780829
Merge pull request #7578 from nicoddemus/backport-7555
[6.0.x] Warn about --basetemp removing the entire directory (#7555)
2020-07-29 12:13:16 -03:00
Bruno Oliveira b945b39b0b
Merge pull request #7577 from nicoddemus/backport-7427
[6.0.x] Fix --help crash on add_ini(.., help='') and improve message on help=None (#7427)
2020-07-29 12:10:42 -03:00
Mattreex 2d5b8a85c2 Warn about --basetemp removing the entire directory (#7555)
Co-authored-by: mattreex <mattreex.9@gail.com>
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
(cherry picked from commit 1e66ed0b1c)
2020-07-29 11:58:52 -03:00
hp310780 8963644da3 Fix --help crash on add_ini(.., help='') and improve message on help=None (#7427) 2020-07-29 11:49:09 -03:00
524 changed files with 27840 additions and 68406 deletions

View File

@ -25,9 +25,5 @@ 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*@pytest\.mark\.xfail

View File

@ -23,13 +23,6 @@ afc607cfd81458d4e4f3b1f3cf8cc931b933907e
5f95dce95602921a70bfbc7d8de2f7712c5e4505 5f95dce95602921a70bfbc7d8de2f7712c5e4505
# ran pyupgrade-docs again # ran pyupgrade-docs again
75d0b899bbb56d6849e9d69d83a9426ed3f43f8b 75d0b899bbb56d6849e9d69d83a9426ed3f43f8b
# move argument parser to own file # move argument parser to own file
c9df77cbd6a365dcb73c39618e4842711817e871 c9df77cbd6a365dcb73c39618e4842711817e871
# Replace reorder-python-imports by isort due to black incompatibility (#11896)
8b54596639f41dfac070030ef20394b9001fe63c
# Run blacken-docs with black's 2024's style
4546d5445aaefe6a03957db028c263521dfb5c4b
# Migration to ruff / ruff format
4588653b2497ed25976b7aaff225b889fb476756
# Use format specifiers instead of percent format
4788165e69d08e10fc6b9c0124083fb358e2e9b0

View File

@ -1,16 +1,10 @@
---
name: 🐛 Bug Report
about: Report errors and problems
---
<!-- <!--
Thanks for submitting an issue! Thanks for submitting an issue!
Quick check-list while reporting bugs: Here's a quick checklist for what to provide:
--> -->
- [ ] a detailed description of the bug or problem you are having - [ ] a detailed description of the bug or suggestion
- [ ] output of `pip list` from the virtual environment you are using - [ ] output of `pip list` from the virtual environment you are using
- [ ] pytest and operating system versions - [ ] pytest and operating system versions
- [ ] minimal example if possible - [ ] minimal example if possible

View File

@ -1,25 +0,0 @@
---
name: 🚀 Feature Request
about: Ideas for new features and improvements
---
<!--
Thanks for suggesting a feature!
Quick check-list while suggesting features:
-->
#### What's the problem this feature will solve?
<!-- What are you trying to do, that you are unable to achieve with pytest as it currently stands? -->
#### Describe the solution you'd like
<!-- A clear and concise description of what you want to happen. -->
<!-- Provide examples of real-world use cases that this would enable and how it solves the problem described above. -->
#### Alternative Solutions
<!-- Have you tried to workaround the problem using a pytest plugin or other tools? Or a different approach to solving this issue? Please elaborate here. -->
#### Additional context
<!-- Add any other context, links, etc. about the feature here. -->

View File

@ -1,5 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: ❓ Support Question
url: https://github.com/pytest-dev/pytest/discussions
about: Use GitHub's new Discussions feature for questions

View File

@ -13,7 +13,7 @@ If this change fixes an issue, please:
Unless your change is trivial or a small documentation fix (e.g., a typo or reword of a small section) please: Unless your change is trivial or a small documentation fix (e.g., a typo or reword of a small section) please:
- [ ] Create a new changelog file in the `changelog` folder, with a name like `<ISSUE NUMBER>.<TYPE>.rst`. See [changelog/README.rst](https://github.com/pytest-dev/pytest/blob/main/changelog/README.rst) for details. - [ ] Create a new changelog file in the `changelog` folder, with a name like `<ISSUE NUMBER>.<TYPE>.rst`. See [changelog/README.rst](https://github.com/pytest-dev/pytest/blob/master/changelog/README.rst) for details.
Write sentences in the **past or present tense**, examples: Write sentences in the **past or present tense**, examples:

View File

@ -1,20 +0,0 @@
---
branch-protection-check-name: Changelog entry
action-hints:
check-title-prefix: "Chronographer: "
external-docs-url: >-
https://docs.pytest.org/en/latest/contributing.html#preparing-pull-requests
inline-markdown: >-
See
https://docs.pytest.org/en/latest/contributing.html#preparing-pull-requests
for details.
enforce-name:
suffix: .rst
exclude:
humans:
- pyup-bot
labels:
skip-changelog: skip news
...

View File

@ -1,17 +0,0 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/testing/plugins_integration"
schedule:
interval: weekly
time: "03:00"
open-pull-requests-limit: 10
allow:
- dependency-type: direct
- dependency-type: indirect
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
time: "03:00"
open-pull-requests-limit: 10

View File

@ -1,7 +0,0 @@
---
backport_branch_prefix: patchback/backports/
backport_label_prefix: 'backport ' # IMPORTANT: the labels are space-delimited
# target_branch_prefix: '' # The project's backport branches are non-prefixed
...

View File

@ -1,108 +0,0 @@
name: deploy
on:
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: true
default: '1.2.3'
# Set permissions at the job level.
permissions: {}
jobs:
package:
runs-on: ubuntu-latest
env:
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event.inputs.version }}
timeout-minutes: 10
# Required by attest-build-provenance-github.
permissions:
id-token: write
attestations: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Build and Check Package
uses: hynek/build-and-inspect-python-package@v2.6.0
with:
attest-build-provenance-github: 'true'
deploy:
if: github.repository == 'pytest-dev/pytest'
needs: [package]
runs-on: ubuntu-latest
environment: deploy
timeout-minutes: 30
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
- name: Download Package
uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@v1.9.0
- name: Push tag
run: |
git config user.name "pytest bot"
git config user.email "pytestbot@gmail.com"
git tag --annotate --message=v${{ github.event.inputs.version }} ${{ github.event.inputs.version }} ${{ github.sha }}
git push origin ${{ github.event.inputs.version }}
release-notes:
# todo: generate the content in the build job
# the goal being of using a github action script to push the release data
# after success instead of creating a complete python/tox env
needs: [deploy]
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Download Package
uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install --upgrade tox
- name: Generate release notes
run: |
sudo apt-get install pandoc
tox -e generate-gh-release-notes -- ${{ github.event.inputs.version }} scripts/latest-release-notes.md
- name: Publish GitHub Release
uses: softprops/action-gh-release@v2
with:
body_path: scripts/latest-release-notes.md
files: dist/*
tag_name: ${{ github.event.inputs.version }}

218
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,218 @@
name: main
on:
push:
branches:
- master
- "[0-9]+.[0-9]+.x"
tags:
- "*"
pull_request:
branches:
- master
- "[0-9]+.[0-9]+.x"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
name: [
"windows-py35",
"windows-py36",
"windows-py37",
"windows-py37-pluggy",
"windows-py38",
"ubuntu-py35",
"ubuntu-py36",
"ubuntu-py37",
"ubuntu-py37-pluggy",
"ubuntu-py37-freeze",
"ubuntu-py38",
"ubuntu-py39",
"ubuntu-pypy3",
"macos-py37",
"macos-py38",
"docs",
"doctesting",
"plugins",
]
include:
- name: "windows-py35"
python: "3.5"
os: windows-latest
tox_env: "py35-xdist"
use_coverage: true
- name: "windows-py36"
python: "3.6"
os: windows-latest
tox_env: "py36-xdist"
- name: "windows-py37"
python: "3.7"
os: windows-latest
tox_env: "py37-numpy"
- name: "windows-py37-pluggy"
python: "3.7"
os: windows-latest
tox_env: "py37-pluggymaster-xdist"
- name: "windows-py38"
python: "3.8"
os: windows-latest
tox_env: "py38-unittestextras"
use_coverage: true
- name: "ubuntu-py35"
python: "3.5"
os: ubuntu-latest
tox_env: "py35-xdist"
- name: "ubuntu-py36"
python: "3.6"
os: ubuntu-latest
tox_env: "py36-xdist"
- name: "ubuntu-py37"
python: "3.7"
os: ubuntu-latest
tox_env: "py37-lsof-numpy-oldattrs-pexpect"
use_coverage: true
- name: "ubuntu-py37-pluggy"
python: "3.7"
os: ubuntu-latest
tox_env: "py37-pluggymaster-xdist"
- name: "ubuntu-py37-freeze"
python: "3.7"
os: ubuntu-latest
tox_env: "py37-freeze"
- name: "ubuntu-py38"
python: "3.8"
os: ubuntu-latest
tox_env: "py38-xdist"
- name: "ubuntu-py39"
python: "3.9-dev"
os: ubuntu-latest
tox_env: "py39-xdist"
- name: "ubuntu-pypy3"
python: "pypy3"
os: ubuntu-latest
tox_env: "pypy3-xdist"
- name: "macos-py37"
python: "3.7"
os: macos-latest
tox_env: "py37-xdist"
- name: "macos-py38"
python: "3.8"
os: macos-latest
tox_env: "py38-xdist"
use_coverage: true
- name: "plugins"
python: "3.7"
os: ubuntu-latest
tox_env: "plugins"
- name: "docs"
python: "3.7"
os: ubuntu-latest
tox_env: "docs"
- name: "doctesting"
python: "3.7"
os: ubuntu-latest
tox_env: "doctesting"
use_coverage: true
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
if: matrix.python != '3.9-dev'
with:
python-version: ${{ matrix.python }}
- name: Set up Python ${{ matrix.python }} (deadsnakes)
uses: deadsnakes/action@v1.0.0
if: matrix.python == '3.9-dev'
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox coverage
- name: Test without coverage
if: "! matrix.use_coverage"
run: "tox -e ${{ matrix.tox_env }}"
- name: Test with coverage
if: "matrix.use_coverage"
env:
_PYTEST_TOX_COVERAGE_RUN: "coverage run -m"
COVERAGE_PROCESS_START: ".coveragerc"
_PYTEST_TOX_EXTRA_DEP: "coverage-enable-subprocess"
run: "tox -e ${{ matrix.tox_env }}"
- name: Prepare coverage token
if: (matrix.use_coverage && ( github.repository == 'pytest-dev/pytest' || github.event_name == 'pull_request' ))
run: |
python scripts/append_codecov_token.py
- name: Report coverage
if: (matrix.use_coverage)
env:
CODECOV_NAME: ${{ matrix.name }}
run: bash scripts/report-coverage.sh -F GHA,${{ runner.os }}
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: set PY
run: echo "::set-env name=PY::$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')"
- uses: actions/cache@v1
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- run: 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
needs: [build]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- 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: ${{ secrets.release_notes }}
run: |
sudo apt-get install pandoc
tox -e publish-gh-release-notes

View File

@ -1,52 +0,0 @@
name: prepare release pr
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to base the release from'
required: true
default: ''
major:
description: 'Major release? (yes/no)'
required: true
default: 'no'
prerelease:
description: 'Prerelease (ex: rc1). Leave empty if not a pre-release.'
required: false
default: ''
# Set permissions at the job level.
permissions: {}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools tox
- name: Prepare release PR (minor/patch release)
if: github.event.inputs.major == 'no'
run: |
tox -e prepare-release-pr -- ${{ github.event.inputs.branch }} ${{ github.token }} --prerelease='${{ github.event.inputs.prerelease }}'
- name: Prepare release PR (major release)
if: github.event.inputs.major == 'yes'
run: |
tox -e prepare-release-pr -- ${{ github.event.inputs.branch }} ${{ github.token }} --major --prerelease='${{ github.event.inputs.prerelease }}'

View File

@ -0,0 +1,31 @@
# part of our release process, see `release-on-comment.py`
name: release on comment
on:
issues:
types: [opened, edited]
issue_comment:
types: [created, edited]
jobs:
build:
runs-on: ubuntu-latest
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
- 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 ${{ secrets.chatops }}

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@v9
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 the `status: needs information` label and requested follow-up information was not provided for 14 days."
close-issue-message: "This issue was closed because it has the `status: needs information` label and follow-up information has not been provided for 7 days since being marked as stale."
days-before-pr-stale: -1
days-before-pr-close: -1

View File

@ -1,267 +0,0 @@
name: test
on:
push:
branches:
- main
- "[0-9]+.[0-9]+.x"
- "test-me-*"
tags:
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
pull_request:
branches:
- main
- "[0-9]+.[0-9]+.x"
types:
- opened # default
- synchronize # default
- reopened # default
- ready_for_review # used in PRs created from the release workflow
env:
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.
permissions: {}
jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Build and Check Package
uses: hynek/build-and-inspect-python-package@v2.6.0
build:
needs: [package]
runs-on: ${{ matrix.os }}
timeout-minutes: 45
permissions:
contents: read
strategy:
fail-fast: false
matrix:
name: [
"windows-py38",
"windows-py38-pluggy",
"windows-py39",
"windows-py310",
"windows-py311",
"windows-py312",
"windows-py313",
"ubuntu-py38",
"ubuntu-py38-pluggy",
"ubuntu-py38-freeze",
"ubuntu-py39",
"ubuntu-py310",
"ubuntu-py311",
"ubuntu-py312",
"ubuntu-py313",
"ubuntu-pypy3",
"macos-py38",
"macos-py39",
"macos-py310",
"macos-py312",
"macos-py313",
"doctesting",
"plugins",
]
include:
- name: "windows-py38"
python: "3.8"
os: windows-latest
tox_env: "py38-unittestextras"
use_coverage: true
- name: "windows-py38-pluggy"
python: "3.8"
os: windows-latest
tox_env: "py38-pluggymain-pylib-xdist"
- name: "windows-py39"
python: "3.9"
os: windows-latest
tox_env: "py39-xdist"
- name: "windows-py310"
python: "3.10"
os: windows-latest
tox_env: "py310-xdist"
- name: "windows-py311"
python: "3.11"
os: windows-latest
tox_env: "py311"
- name: "windows-py312"
python: "3.12"
os: windows-latest
tox_env: "py312"
- name: "windows-py313"
python: "3.13-dev"
os: windows-latest
tox_env: "py313"
- name: "ubuntu-py38"
python: "3.8"
os: ubuntu-latest
tox_env: "py38-lsof-numpy-pexpect"
use_coverage: true
- name: "ubuntu-py38-pluggy"
python: "3.8"
os: ubuntu-latest
tox_env: "py38-pluggymain-pylib-xdist"
- name: "ubuntu-py38-freeze"
python: "3.8"
os: ubuntu-latest
tox_env: "py38-freeze"
- name: "ubuntu-py39"
python: "3.9"
os: ubuntu-latest
tox_env: "py39-xdist"
- name: "ubuntu-py310"
python: "3.10"
os: ubuntu-latest
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"
os: ubuntu-latest
tox_env: "py312"
use_coverage: true
- name: "ubuntu-py313"
python: "3.13-dev"
os: ubuntu-latest
tox_env: "py313"
use_coverage: true
- name: "ubuntu-pypy3"
python: "pypy-3.8"
os: ubuntu-latest
tox_env: "pypy3-xdist"
- name: "macos-py38"
python: "3.8"
os: macos-latest
tox_env: "py38-xdist"
- name: "macos-py39"
python: "3.9"
os: macos-latest
tox_env: "py39-xdist"
use_coverage: true
- name: "macos-py310"
python: "3.10"
os: macos-latest
tox_env: "py310-xdist"
- name: "macos-py312"
python: "3.12"
os: macos-latest
tox_env: "py312-xdist"
- name: "macos-py313"
python: "3.13-dev"
os: macos-latest
tox_env: "py313-xdist"
- name: "plugins"
python: "3.12"
os: ubuntu-latest
tox_env: "plugins"
- name: "doctesting"
python: "3.8"
os: ubuntu-latest
tox_env: "doctesting"
use_coverage: true
continue-on-error: >-
${{
contains(
fromJSON(
'[
"windows-py38-pluggy",
"windows-py313",
"ubuntu-py38-pluggy",
"ubuntu-py38-freeze",
"ubuntu-py313",
"macos-py38",
"macos-py313"
]'
),
matrix.name
)
&& true
|| false
}}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Download Package
uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
check-latest: ${{ endsWith(matrix.python, '-dev') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox coverage
- name: Test without coverage
if: "! matrix.use_coverage"
shell: bash
run: tox run -e ${{ matrix.tox_env }} --installpkg `find dist/*.tar.gz`
- name: Test with coverage
if: "matrix.use_coverage"
shell: bash
run: tox run -e ${{ matrix.tox_env }}-coverage --installpkg `find dist/*.tar.gz`
- name: Generate coverage report
if: "matrix.use_coverage"
run: python -m coverage xml
- name: Upload coverage to Codecov
if: "matrix.use_coverage"
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
files: ./coverage.xml
verbose: true
check: # This job does nothing and is only used for the branch protection
if: always()
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@223e4bb7a751b91f43eda76992bcfbf23b8b0302
with:
jobs: ${{ toJSON(needs) }}

View File

@ -1,68 +0,0 @@
name: Update Plugin List
on:
schedule:
# At 00:00 on Sunday.
# https://crontab.guru
- cron: '0 0 * * 0'
workflow_dispatch:
# Set permissions at the job level.
permissions: {}
jobs:
update-plugin-list:
if: github.repository_owner == 'pytest-dev'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- name: requests-cache
uses: actions/cache@v4
with:
path: ~/.cache/pytest-plugin-list/
key: plugins-http-cache-${{ github.run_id }} # Can use time based key as well
restore-keys: plugins-http-cache-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install packaging requests tabulate[widechars] tqdm requests-cache platformdirs
- name: Update Plugin List
run: python scripts/update-plugin-list.py
- name: Create Pull Request
id: pr
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c
with:
commit-message: '[automated] Update plugin list'
author: 'pytest bot <pytestbot@users.noreply.github.com>'
branch: update-plugin-list/patch
delete-branch: true
branch-suffix: short-commit-hash
title: '[automated] Update plugin list'
body: '[automated] Update plugin list'
draft: true
- name: Instruct the maintainers to trigger CI by undrafting the PR
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh pr comment
--body 'Please mark the PR as ready for review to trigger PR checks.'
--repo '${{ github.repository }}'
'${{ steps.pr.outputs.pull-request-number }}'

7
.gitignore vendored
View File

@ -25,6 +25,7 @@ src/_pytest/_version.py
doc/*/_build doc/*/_build
doc/*/.doctrees doc/*/.doctrees
doc/*/_changelog_towncrier_draft.rst
build/ build/
dist/ dist/
*.egg-info *.egg-info
@ -33,7 +34,6 @@ issue/
env/ env/
.env/ .env/
.venv/ .venv/
/pythonenv*/
3rdparty/ 3rdparty/
.tox .tox
.cache .cache
@ -49,11 +49,6 @@ coverage.xml
.project .project
.settings .settings
.vscode .vscode
__pycache__/
.python-version
# generated by pip # generated by pip
pip-wheel-metadata/ pip-wheel-metadata/
# pytest debug logs generated via --debug
pytestdebug.log

View File

@ -1,62 +1,55 @@
repos: repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/psf/black
rev: "v0.4.10" rev: 19.10b0
hooks: hooks:
- id: ruff - id: black
args: ["--fix"] args: [--safe, --quiet]
- id: ruff-format - repo: https://github.com/asottile/blacken-docs
rev: v1.7.0
hooks:
- id: blacken-docs
additional_dependencies: [black==19.10b0]
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0 rev: v3.1.0
hooks: hooks:
- id: trailing-whitespace - id: trailing-whitespace
- id: end-of-file-fixer - id: end-of-file-fixer
- id: fix-encoding-pragma
args: [--remove]
- id: check-yaml - id: check-yaml
- repo: https://github.com/adamchainz/blacken-docs - id: debug-statements
rev: 1.16.0 exclude: _pytest/(debugging|hookspec).py
language_version: python3
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.2
hooks: hooks:
- id: blacken-docs - id: flake8
additional_dependencies: [black==24.1.1] language_version: python3
- repo: https://github.com/pre-commit/pygrep-hooks additional_dependencies: [flake8-typing-imports==1.9.0]
rev: v1.10.0 - repo: https://github.com/asottile/reorder_python_imports
rev: v2.3.0
hooks: hooks:
- id: python-use-type-annotations - id: reorder-python-imports
- repo: https://github.com/pre-commit/mirrors-mypy args: ['--application-directories=.:src', --py3-plus]
rev: v1.10.0
hooks:
- id: mypy
files: ^(src/|testing/|scripts/)
args: []
additional_dependencies:
- iniconfig>=1.1.0
- attrs>=19.2.0
- pluggy>=1.5.0
- packaging
- tomli
- types-pkg_resources
- types-tabulate
# for mypy running on python>=3.11 since exceptiongroup is only a dependency
# on <3.11
- exceptiongroup>=1.0.0rc8
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "2.1.3"
hooks:
- id: pyproject-fmt
# https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version
additional_dependencies: ["tox>=4.9"]
- repo: https://github.com/asottile/pyupgrade - repo: https://github.com/asottile/pyupgrade
rev: v3.16.0 rev: v2.4.4
hooks: hooks:
- id: pyupgrade - id: pyupgrade
stages: [manual] args: [--py3-plus]
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.9.0
hooks:
- id: setup-cfg-fmt
# TODO: when upgrading setup-cfg-fmt this can be removed
args: [--max-py-version=3.9]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.780 # NOTE: keep this in sync with setup.cfg.
hooks:
- id: mypy
files: ^(src/|testing/)
args: []
- repo: local - repo: local
hooks: hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
args: ["-rn", "-sn", "--fail-on=I"]
stages: [manual]
- id: rst - id: rst
name: rst name: rst
entry: rst-lint --encoding utf-8 entry: rst-lint --encoding utf-8
@ -66,50 +59,9 @@ repos:
- id: changelogs-rst - id: changelogs-rst
name: changelog filenames name: changelog filenames
language: fail language: fail
entry: >- entry: 'changelog files must be named ####.(breaking|bugfix|deprecation|doc|feature|improvement|trivial|vendor).rst'
changelog files must be named exclude: changelog/(\d+\.(breaking|bugfix|deprecation|doc|feature|improvement|trivial|vendor).rst|README.rst|_template.rst)
####.(
breaking
| deprecation
| feature
| improvement
| bugfix
| vendor
| doc
| packaging
| contrib
| misc
)(.#)?(.rst)?
exclude: >-
(?x)
^
changelog/(
\.gitignore
|\d+\.(
breaking
|deprecation
|feature
|improvement
|bugfix
|vendor
|doc
|packaging
|contrib
|misc
)(\.\d+)?(\.rst)?
|README\.rst
|_template\.rst
)
$
files: ^changelog/ files: ^changelog/
- id: changelogs-user-role
name: Changelog files should use a non-broken :user:`name` role
language: pygrep
entry: :user:([^`]+`?|`[^`]+[\s,])
pass_filenames: true
types:
- file
- rst
- id: py-deprecated - id: py-deprecated
name: py library is deprecated name: py library is deprecated
language: pygrep language: pygrep
@ -118,17 +70,9 @@ repos:
_code\.| _code\.|
builtin\.| builtin\.|
code\.| code\.|
io\.| io\.(BytesIO|saferepr|TerminalWriter)|
path\.local\.sysfind| path\.local\.sysfind|
process\.| process\.|
std\.| std\.
error\.|
xml\.
) )
types: [python] types: [python]
- id: py-path-deprecated
name: py.path usage is deprecated
exclude: docs|src/_pytest/deprecated.py|testing/deprecated_test.py|src/_pytest/legacypath.py
language: pygrep
entry: \bpy\.path\.local
types: [python]

View File

@ -1,31 +0,0 @@
version: 2
python:
install:
# Install pytest first, then doc/en/requirements.txt.
# This order is important to honor any pins in doc/en/requirements.txt
# when the pinned library is also a dependency of pytest.
- method: pip
path: .
- requirements: doc/en/requirements.txt
sphinx:
configuration: doc/en/conf.py
fail_on_warning: true
build:
os: ubuntu-24.04
tools:
python: >-
3.12
apt_packages:
- inkscape
jobs:
post_checkout:
- git fetch --unshallow || true
- git fetch --tags || true
formats:
- epub
- pdf
- htmlzip

60
.travis.yml Normal file
View File

@ -0,0 +1,60 @@
language: python
dist: trusty
python: '3.5.1'
cache: false
env:
global:
- PYTEST_ADDOPTS=-vv
# setuptools-scm needs all tags in order to obtain a proper version
git:
depth: false
install:
- python -m pip install --upgrade --pre tox
jobs:
include:
# Coverage for Python 3.5.{0,1} specific code, mostly typing related.
- env: TOXENV=py35 PYTEST_COVERAGE=1 PYTEST_ADDOPTS="-k test_raises_cyclic_reference"
before_install:
# Work around https://github.com/jaraco/zipp/issues/40.
- python -m pip install -U 'setuptools>=34.4.0' virtualenv==16.7.9
before_script:
- |
# Do not (re-)upload coverage with cron runs.
if [[ "$TRAVIS_EVENT_TYPE" = cron ]]; then
PYTEST_COVERAGE=0
fi
- |
if [[ "$PYTEST_COVERAGE" = 1 ]]; then
export COVERAGE_FILE="$PWD/.coverage"
export COVERAGE_PROCESS_START="$PWD/.coveragerc"
export _PYTEST_TOX_COVERAGE_RUN="coverage run -m"
export _PYTEST_TOX_EXTRA_DEP=coverage-enable-subprocess
fi
script: tox
after_success:
- |
if [[ "$PYTEST_COVERAGE" = 1 ]]; then
env CODECOV_NAME="$TOXENV-$TRAVIS_OS_NAME" scripts/report-coverage.sh -F Travis
fi
notifications:
irc:
channels:
- "chat.freenode.net#pytest"
on_success: change
on_failure: change
skip_join: true
email:
- pytest-commit@python.org
branches:
only:
- master
- /^\d+\.\d+\.x$/

154
AUTHORS
View File

@ -5,22 +5,14 @@ Contributors include::
Aaron Coleman Aaron Coleman
Abdeali JK Abdeali JK
Abdelrahman Elbehery
Abhijeet Kasurde Abhijeet Kasurde
Adam Johnson Adam Johnson
Adam Stewart
Adam Uhlir Adam Uhlir
Ahn Ki-Wook Ahn Ki-Wook
Akhilesh Ramakrishnan
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
@ -29,48 +21,32 @@ Anders Hovmöller
Andras Mitzki Andras Mitzki
Andras Tim Andras Tim
Andrea Cimatoribus Andrea Cimatoribus
Andreas Motl
Andreas Zeidler Andreas Zeidler
Andrew Shapton
Andrey Paramonov Andrey Paramonov
Andrzej Klajnert Andrzej Klajnert
Andrzej Ostrowski Andrzej Ostrowski
Andy Freeland Andy Freeland
Anita Hammer
Anthon van der Neut Anthon van der Neut
Anthony Shaw Anthony Shaw
Anthony Sottile Anthony Sottile
Anton Grinevich
Anton Lodder Anton Lodder
Antony Lee Antony Lee
Arel Cordero Arel Cordero
Arias Emmanuel
Ariel Pillemer
Armin Rigo Armin Rigo
Aron Coyle Aron Coyle
Aron Curzon Aron Curzon
Arthur Richard
Ashish Kurmi
Aviral Verma Aviral Verma
Aviv Palivoda Aviv Palivoda
Babak Keyvani
Barney Gale Barney Gale
Ben Brown
Ben Gartner
Ben Leith
Ben Webb Ben Webb
Benjamin Peterson Benjamin Peterson
Benjamin Schubert
Bernard Pratz Bernard Pratz
Bo Wu
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
@ -78,36 +54,24 @@ 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 Rose
Chris Wheeler
Christian Boelsen Christian Boelsen
Christian Fetzer Christian Fetzer
Christian Neumüller Christian Neumüller
Christian Theunert Christian Theunert
Christian Tismer Christian Tismer
Christine Mecklenborg
Christoph Buelter Christoph Buelter
Christopher Dignam Christopher Dignam
Christopher Gilling Christopher Gilling
Claire Cecil Claire Cecil
Claudio Madotto Claudio Madotto
Clément M.T. Robert
CrazyMerlyn CrazyMerlyn
Cristian Vera
Cyrus Maden Cyrus Maden
Damian Skrzypczak Damian Skrzypczak
Daniel Grana Daniel Grana
Daniel Hahler Daniel Hahler
Daniel Miller
Daniel Nuri Daniel Nuri
Daniel Sánchez Castelló
Daniel Valenzuela Zenteno
Daniel Wandschneider Daniel Wandschneider
Daniele Procida
Danielle Jenkins Danielle Jenkins
Daniil Galiev Daniil Galiev
Dave Hunt Dave Hunt
@ -119,54 +83,34 @@ David Vierra
Daw-Ran Liou Daw-Ran Liou
Debi Mishra Debi Mishra
Denis Kirisov Denis Kirisov
Denivy Braiam Rück
Dheeraj C K
Dhiren Serai Dhiren Serai
Diego Russo Diego Russo
Dmitry Dygalo Dmitry Dygalo
Dmitry Pribysh Dmitry Pribysh
Dominic Mortlock
Duncan Betts Duncan Betts
Edison Gustavo Muenz Edison Gustavo Muenz
Edoardo Batini Edoardo Batini
Edson Tadeu M. Manoel
Eduardo Schettino Eduardo Schettino
Edward Haigh
Eero Vaher
Eli Boyarski Eli Boyarski
Elizaveta Shashkova Elizaveta Shashkova
Éloi Rivard
Endre Galaczi Endre Galaczi
Eric Hunsberger Eric Hunsberger
Eric Liu
Eric Siegerman Eric Siegerman
Eric Yuan
Erik Aronesty Erik Aronesty
Erik Hasse
Erik M. Bray Erik M. Bray
Evan Kepner Evan Kepner
Evgeny Seliverstov
Fabian Sturm
Fabien Zarifian Fabien Zarifian
Fabio Zadrozny Fabio Zadrozny
Farbod Ahmadian
faph
Felix Hofstätter
Felix Nieuwenhuizen Felix Nieuwenhuizen
Feng Ma Feng Ma
Florian Bruhin Florian Bruhin
Florian Dahlitz Florian Dahlitz
Floris Bruynooghe Floris Bruynooghe
Fraser Stark
Gabriel Landau
Gabriel Reis Gabriel Reis
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
@ -175,7 +119,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
@ -184,16 +127,9 @@ Ian Bicking
Ian Lesperance Ian Lesperance
Ilya Konstantinov Ilya Konstantinov
Ionuț Turturică Ionuț Turturică
Isaac Virshup
Israel Fruchter
Itxaso Aizpurua
Iwan Briquemont Iwan Briquemont
Jaap Broekhuizen Jaap Broekhuizen
Jake VanderPlas
Jakob van Santen
Jakub Mitoraj Jakub Mitoraj
James Bourbeau
James Frost
Jan Balster Jan Balster
Janne Vanhala Janne Vanhala
Jason R. Coombs Jason R. Coombs
@ -202,51 +138,36 @@ Javier Romero
Jeff Rackauckas Jeff Rackauckas
Jeff Widman Jeff Widman
Jenni Rinker Jenni Rinker
Jens Tröger
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
Jordan Moldow Jordan Moldow
Jordan Speicher Jordan Speicher
Joseph Hunkeler Joseph Hunkeler
Joseph Sawaya
Josh Karpel Josh Karpel
Joshua Bronson Joshua Bronson
Jurko Gospodnetić Jurko Gospodnetić
Justice Ndou
Justyna Janczyszyn Justyna Janczyszyn
Kale Kundert Kale Kundert
Kamran Ahmad
Kenny Y
Karl O. Pinc Karl O. Pinc
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
Lawrence Mitchell Lawrence Mitchell
Lee Kamentsky Lee Kamentsky
Lev Maximov Lev Maximov
Levon Saldamli
Lewis Cowles Lewis Cowles
Llandy Riveron Del Risco Llandy Riveron Del Risco
Loic Esteve Loic Esteve
lovetheguitar
Lukas Bednar Lukas Bednar
Luke Murphy Luke Murphy
Maciek Fijalkowski Maciek Fijalkowski
@ -254,16 +175,12 @@ Maho
Maik Figura Maik Figura
Mandeep Bhutani Mandeep Bhutani
Manuel Krebber Manuel Krebber
Marc Mueller
Marc Schlaich Marc Schlaich
Marcelo Duarte Trevisani Marcelo Duarte Trevisani
Marcin Bachry Marcin Bachry
Marc Bresson
Marco Gorelli Marco Gorelli
Mark Abramowitz Mark Abramowitz
Mark Dickinson Mark Dickinson
Mark Vong
Marko Pacak
Markus Unterwaditzer Markus Unterwaditzer
Martijn Faassen Martijn Faassen
Martin Altmayer Martin Altmayer
@ -283,74 +200,49 @@ Michael Droettboom
Michael Goerz Michael Goerz
Michael Krebs Michael Krebs
Michael Seifert Michael Seifert
Michael Vogt
Michal Wajszczuk Michal Wajszczuk
Michał Górny
Michał Zięba
Mickey Pashov
Mihai Capotă Mihai Capotă
Mihail Milushev
Mike Hoyle (hoylemd) Mike Hoyle (hoylemd)
Mike Lundy Mike Lundy
Milan Lesnek
Miro Hrončok Miro Hrončok
mrbean-bremen
Nathan Goldbaum
Nathaniel Compton Nathaniel Compton
Nathaniel Waisbrot Nathaniel Waisbrot
Ned Batchelder Ned Batchelder
Neil Martin
Neven Mundar Neven Mundar
Nicholas Devenish Nicholas Devenish
Nicholas Murphy Nicholas Murphy
Niclas Olofsson Niclas Olofsson
Nicolas Delaby Nicolas Delaby
Nico Vidal
Nikolay Kondratyev Nikolay Kondratyev
Nipunn Koorapati
Oleg Pidsadnyi Oleg Pidsadnyi
Oleg Sushchenko Oleg Sushchenko
Olga Matoula
Oliver Bestwalter Oliver Bestwalter
Omar Kohl Omar Kohl
Omer Hadari Omer Hadari
Ondřej Súkup Ondřej Súkup
Oscar Benjamin Oscar Benjamin
Parth Patel
Patrick Hayes Patrick Hayes
Patrick Lannigan
Paul Müller
Paul Reece
Pauli Virtanen Pauli Virtanen
Pavel Karateev Pavel Karateev
Paweł Adamczak Paweł Adamczak
Pedro Algarvio Pedro Algarvio
Petter Strandmark
Philipp Loose Philipp Loose
Pierre Sassoulas
Pieter Mulder Pieter Mulder
Piotr Banaszkiewicz Piotr Banaszkiewicz
Piotr Helm Piotr Helm
Poulami Sau
Prakhar Gurunani
Prashant Anand Prashant Anand
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
Reagan Lee
Robert Holt Robert Holt
Roberto Aldera
Roberto Polli Roberto Polli
Roland Puntaier Roland Puntaier
Romain Dorgueil Romain Dorgueil
@ -359,85 +251,52 @@ Ronny Pfannschmidt
Ross Lawley Ross Lawley
Ruaridh Williamson Ruaridh Williamson
Russel Winder Russel Winder
Russell Martin
Ryan Puddephatt
Ryan Wooden Ryan Wooden
Sadra Barikbin
Saiprasad Kale
Samuel Colvin
Samuel Dion-Girardeau Samuel Dion-Girardeau
Samuel Jirovec
Samuel Searles-Bryant Samuel Searles-Bryant
Samuel Therrien (Avasam)
Samuele Pedroni Samuele Pedroni
Sanket Duthade
Sankt Petersbug Sankt Petersbug
Saravanan Padmanaban
Sean Malloy
Segev Finer Segev Finer
Serhii Mozghovyi Serhii Mozghovyi
Seth Junot Seth Junot
Shantanu Jain
Sharad Nair
Shubham Adep
Simon Blanchard
Simon Gomizelj Simon Gomizelj
Simon Holesch
Simon Kerr Simon Kerr
Skylar Downes Skylar Downes
Srinivas Reddy Thatiparthy Srinivas Reddy Thatiparthy
Stefaan Lippens
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
Sven-Hendrik Haase Sven-Hendrik Haase
Sviatoslav Sydorenko
Sylvain Marié Sylvain Marié
Tadek Teleżyński Tadek Teleżyński
Takafumi Arakaki Takafumi Arakaki
Taneli Hukkinen
Tanvi Mehta
Tanya Agarwal
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
Tushar Sadhwani
Tyler Goodlet Tyler Goodlet
Tyler Smart
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
Vijay Arora
Virendra Patil
Virgil Dupras Virgil Dupras
Vitaly Lashmanov Vitaly Lashmanov
Vivaan Verma
Vlad Dragos Vlad Dragos
Vlad Radziuk Vlad Radziuk
Vladyslav Rachek Vladyslav Rachek
Volodymyr Kochetkov
Volodymyr Piskun Volodymyr Piskun
Wei Lin Wei Lin
Wil Cooley Wil Cooley
@ -447,17 +306,6 @@ Wouter van Ackooy
Xixi Zhao Xixi Zhao
Xuan Luong Xuan Luong
Xuecong Liao Xuecong Liao
Yannick Péroux
Yao Xiao
Yoav Caspi Yoav Caspi
Yuliang Shao
Yusuke Kadowaki
Yutian Li
Yuval Shimon
Zac Hatfield-Dodds Zac Hatfield-Dodds
Zach Snicker
Zachary Kneupper
Zachary OBrien
Zhouxin Qiu
Zoltán Máté Zoltán Máté
Zsolt Cserna

View File

@ -4,4 +4,4 @@ Changelog
The pytest CHANGELOG is located `here <https://docs.pytest.org/en/stable/changelog.html>`__. The pytest CHANGELOG is located `here <https://docs.pytest.org/en/stable/changelog.html>`__.
The source document can be found at: https://github.com/pytest-dev/pytest/blob/main/doc/en/changelog.rst The source document can be found at: https://github.com/pytest-dev/pytest/blob/master/doc/en/changelog.rst

View File

@ -1,10 +1,14 @@
============================ ============================
Contributing Contribution getting started
============================ ============================
Contributions are highly welcomed and appreciated. Every little bit of help counts, Contributions are highly welcomed and appreciated. Every little bit of help counts,
so do not hesitate! so do not hesitate!
.. contents::
:depth: 2
:backlinks: none
.. _submitfeedback: .. _submitfeedback:
@ -46,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 `"good first issue" issues <https://github.com/pytest-dev/pytest/labels/good%20first%20issue>`_
that are friendly to new contributors.
:ref:`Talk <contact>` to developers to find out how you can fix specific bugs. To indicate that you are going :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.
@ -87,48 +89,18 @@ without using a local copy. This can be convenient for small fixes.
The built documentation should be available in ``doc/en/_build/html``, The built documentation should be available in ``doc/en/_build/html``,
where 'en' refers to the documentation language. where 'en' refers to the documentation language.
Pytest has an API reference which in large part is
`generated automatically <https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html>`_
from the docstrings of the documented items. Pytest uses the
`Sphinx docstring format <https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html>`_.
For example:
.. code-block:: python
def my_function(arg: ArgType) -> Foo:
"""Do important stuff.
More detailed info here, in separate paragraphs from the subject line.
Use proper sentences -- start sentences with capital letters and end
with periods.
Can include annotated documentation:
:param short_arg: An argument which determines stuff.
:param long_arg:
A long explanation which spans multiple lines, overflows
like this.
:returns: The result.
:raises ValueError:
Detailed information when this can happen.
.. versionadded:: 6.0
Including types into the annotations above is not necessary when
type-hinting is being used (as in this example).
"""
.. _submitplugin: .. _submitplugin:
Submitting Plugins to pytest-dev Submitting Plugins to pytest-dev
-------------------------------- --------------------------------
Development of the pytest core, support code, and some plugins happens Pytest development of the core, some plugins and support code happens
in repositories living under the ``pytest-dev`` organisations: in repositories living under the ``pytest-dev`` organisations:
- `pytest-dev on GitHub <https://github.com/pytest-dev>`_ - `pytest-dev on GitHub <https://github.com/pytest-dev>`_
- `pytest-dev on Bitbucket <https://bitbucket.org/pytest-dev>`_
All pytest-dev Contributors team members have write access to all contained All pytest-dev Contributors team members have write access to all contained
repositories. Pytest core and plugins are generally developed repositories. Pytest core and plugins are generally developed
using `pull requests`_ to respective repositories. using `pull requests`_ to respective repositories.
@ -144,21 +116,20 @@ You can submit your plugin by subscribing to the `pytest-dev mail list
mail pointing to your existing pytest plugin repository which must have mail pointing to your existing pytest plugin repository which must have
the following: the following:
- PyPI presence with packaging metadata that contains a ``pytest-`` - PyPI presence with a ``setup.py`` that contains a license, ``pytest-``
prefixed name, version number, authors, short and long description. prefixed name, version number, authors, short and long description.
- a `tox configuration <https://tox.readthedocs.io/en/latest/config.html#configuration-discovery>`_ - a ``tox.ini`` for running tests using `tox <https://tox.readthedocs.io>`_.
for running tests using `tox <https://tox.readthedocs.io>`_.
- a ``README`` describing how to use the plugin and on which - a ``README.txt`` describing how to use the plugin and on which
platforms it runs. platforms it runs.
- a ``LICENSE`` file containing the licensing information, with - a ``LICENSE.txt`` file or equivalent containing the licensing
matching info in its packaging metadata. information, with matching info in ``setup.py``.
- an issue tracker for bug reports and enhancement requests. - an issue tracker for bug reports and enhancement requests.
- a `changelog <https://keepachangelog.com/>`_. - a `changelog <http://keepachangelog.com/>`_.
If no contributor strongly objects and two agree, the repository can then be If no contributor strongly objects and two agree, the repository can then be
transferred to the ``pytest-dev`` organisation. transferred to the ``pytest-dev`` organisation.
@ -193,12 +164,11 @@ Short version
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
#. Fork the repository. #. Fork the repository.
#. Fetch tags from upstream if necessary (if you cloned only main `git fetch --tags https://github.com/pytest-dev/pytest`).
#. Enable and install `pre-commit <https://pre-commit.com>`_ to ensure style-guides and code checks are followed. #. Enable and install `pre-commit <https://pre-commit.com>`_ to ensure style-guides and code checks are followed.
#. Follow `PEP-8 <https://www.python.org/dev/peps/pep-0008/>`_ for naming. #. Follow **PEP-8** for naming and `black <https://github.com/psf/black>`_ for formatting.
#. Tests are run using ``tox``:: #. Tests are run using ``tox``::
tox -e linting,py39 tox -e linting,py37
The test environments above are usually enough to cover most cases locally. The test environments above are usually enough to cover most cases locally.
@ -220,7 +190,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:
@ -233,20 +203,14 @@ Here is a simple overview, with pytest-specific bits:
$ git clone git@github.com:YOUR_GITHUB_USERNAME/pytest.git $ git clone git@github.com:YOUR_GITHUB_USERNAME/pytest.git
$ cd pytest $ cd pytest
$ git fetch --tags https://github.com/pytest-dev/pytest # now, create your own branch off "master":
# now, create your own branch off "main":
$ git checkout -b your-bugfix-branch-name main $ git checkout -b your-bugfix-branch-name master
Given we have "major.minor.micro" version numbers, bug fixes will usually Given we have "major.minor.micro" version numbers, bug fixes will usually
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
@ -264,46 +228,52 @@ Here is a simple overview, with pytest-specific bits:
Tox is used to run all the tests and will automatically setup virtualenvs Tox is used to run all the tests and will automatically setup virtualenvs
to run the tests in. to run the tests in.
(will implicitly use https://virtualenv.pypa.io/en/latest/):: (will implicitly use http://www.virtualenv.org/en/latest/)::
$ pip install tox $ pip install tox
#. Run all the tests #. Run all the tests
You need to have Python 3.8 or later available in your system. Now You need to have Python 3.7 available in your system. Now
running tests is as simple as issuing this command:: running tests is as simple as issuing this command::
$ tox -e linting,py39 $ tox -e linting,py37
This command will run tests via the "tox" tool against Python 3.9 This command will run tests via the "tox" tool against Python 3.7
and also perform "lint" coding-style checks. and also perform "lint" coding-style checks.
#. You can now edit your local working copy and run the tests again as necessary. Please follow `PEP-8 <https://www.python.org/dev/peps/pep-0008/>`_ for naming. #. You can now edit your local working copy and run the tests again as necessary. Please follow PEP-8 for naming.
You can pass different options to ``tox``. For example, to run tests on Python 3.9 and pass options to pytest You can pass different options to ``tox``. For example, to run tests on Python 3.7 and pass options to pytest
(e.g. enter pdb on failure) to pytest you can do:: (e.g. enter pdb on failure) to pytest you can do::
$ tox -e py39 -- --pdb $ tox -e py37 -- --pdb
Or to only run tests in a particular test module on Python 3.9:: Or to only run tests in a particular test module on Python 3.7::
$ tox -e py39 -- testing/test_config.py $ tox -e py37 -- testing/test_config.py
When committing, ``pre-commit`` will re-format the files if necessary. When committing, ``pre-commit`` will re-format the files if necessary.
#. If instead of using ``tox`` you prefer to run the tests directly, then we suggest to create a virtual environment and use #. If instead of using ``tox`` you prefer to run the tests directly, then we suggest to create a virtual environment and use
an editable install with the ``dev`` extra:: an editable install with the ``testing`` extra::
$ python3 -m venv .venv $ python3 -m venv .venv
$ source .venv/bin/activate # Linux $ source .venv/bin/activate # Linux
$ .venv/Scripts/activate.bat # Windows $ .venv/Scripts/activate.bat # Windows
$ pip install -e ".[dev]" $ pip install -e ".[testing]"
Afterwards, you can edit the files and run pytest normally:: Afterwards, you can edit the files and run pytest normally::
$ pytest testing/test_config.py $ pytest testing/test_config.py
#. Commit and push once your tests pass and you are happy with your change(s)::
$ git commit -a -m "<commit message>"
$ git push -u
#. Create a new changelog entry in ``changelog``. The file should be named ``<issueid>.<type>.rst``, #. Create a new changelog entry in ``changelog``. The file should be named ``<issueid>.<type>.rst``,
where *issueid* is the number of the issue related to the change and *type* is one of where *issueid* is the number of the issue related to the change and *type* is one of
``feature``, ``improvement``, ``bugfix``, ``doc``, ``deprecation``, ``breaking``, ``vendor`` ``feature``, ``improvement``, ``bugfix``, ``doc``, ``deprecation``, ``breaking``, ``vendor``
@ -312,37 +282,32 @@ Here is a simple overview, with pytest-specific bits:
#. Add yourself to ``AUTHORS`` file if not there yet, in alphabetical order. #. Add yourself to ``AUTHORS`` file if not there yet, in alphabetical order.
#. Commit and push once your tests pass and you are happy with your change(s)::
$ git commit -a -m "<commit message>"
$ git push -u
#. Finally, submit a pull request through the GitHub website using this data:: #. Finally, submit a pull request through the GitHub website using this data::
head-fork: YOUR_GITHUB_USERNAME/pytest head-fork: YOUR_GITHUB_USERNAME/pytest
compare: your-branch-name compare: your-branch-name
base-fork: pytest-dev/pytest base-fork: pytest-dev/pytest
base: main base: master
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 `testdir fixture <https://docs.pytest.org/en/stable/reference.html#testdir>`_, 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:
.. code-block:: python .. code-block:: python
def test_true_assertion(pytester): def test_true_assertion(testdir):
pytester.makepyfile( testdir.makepyfile(
""" """
def test_foo(): def test_foo():
assert True assert True
""" """
) )
result = pytester.runpytest() result = testdir.runpytest()
result.assert_outcomes(failed=0, passed=1) result.assert_outcomes(failed=0, passed=1)
@ -351,14 +316,14 @@ Alternatively, it is possible to make checks based on the actual output of the t
.. code-block:: python .. code-block:: python
def test_true_assertion(pytester): def test_true_assertion(testdir):
pytester.makepyfile( testdir.makepyfile(
""" """
def test_foo(): def test_foo():
assert False assert False
""" """
) )
result = pytester.runpytest() result = testdir.runpytest()
result.stdout.fnmatch_lines(["*assert False*", "*1 failed*"]) result.stdout.fnmatch_lines(["*assert False*", "*1 failed*"])
When choosing a file where to write a new test, take a look at the existing files and see if there's When choosing a file where to write a new test, take a look at the existing files and see if there's
@ -383,7 +348,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.
@ -392,22 +357,15 @@ 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 ``master`` 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 ``master`` anymore.
Automatic method: #. ``git checkout origin/1.2.x -b backport-XXXX`` # use the master PR number here
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
#. 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:
nicoddemus merged commit 0f8b462 into pytest-dev:main nicoddemus merged commit 0f8b462 into pytest-dev:master
#. ``git cherry-pick -x -m1 REVISION`` # use the revision you found above (``0f8b462``). #. ``git cherry-pick -x -m1 REVISION`` # use the revision you found above (``0f8b462``).
@ -417,27 +375,6 @@ Manual method:
* Delete the PR body, it usually contains a duplicate commit message. * Delete the PR body, it usually contains a duplicate commit message.
Who does the backporting
~~~~~~~~~~~~~~~~~~~~~~~~
As mentioned above, bugs should first be fixed on ``main`` (except in rare occasions
that a bug only happens in a previous release). So, who should do the backport procedure described
above?
1. If the bug was fixed by a core developer, it is the main responsibility of that core developer
to do the backport.
2. However, often the merge is done by another maintainer, in which case it is nice of them to
do the backport procedure if they have the time.
3. For bugs submitted by non-maintainers, it is expected that a core developer will to do
the backport, normally the one that merged the PR on ``main``.
4. If a non-maintainers notices a bug which is fixed on ``main`` but has not been backported
(due to maintainers forgetting to apply the *needs backport* label, or just plain missing it),
they are also welcome to open a PR with the backport. The procedure is simple and really
helps with the maintenance of the project.
All the above are not rules, but merely some guidelines/suggestions on what we should expect
about backports.
Handling stale issues/PRs Handling stale issues/PRs
------------------------- -------------------------
@ -459,7 +396,7 @@ can always reopen the issue/pull request in their own time later if it makes sen
When to close When to close
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
Here are a few general rules the maintainers use deciding when to close issues/PRs because Here are a few general rules the maintainers use to decide when to close issues/PRs because
of lack of inactivity: of lack of inactivity:
* Issues labeled ``question`` or ``needs information``: closed after 14 days inactive. * Issues labeled ``question`` or ``needs information``: closed after 14 days inactive.
@ -471,15 +408,15 @@ The above are **not hard rules**, but merely **guidelines**, and can be (and oft
Closing pull requests Closing pull requests
~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
When closing a Pull Request, it needs to be acknowledging the time, effort, and interest demonstrated by the person which submitted it. As mentioned previously, it is not the intent of the team to dismiss a stalled pull request entirely but to merely to clear up our queue, so a message like the one below is warranted when closing a pull request that went stale: When closing a Pull Request, it needs to be acknowledge the time, effort, and interest demonstrated by the person which submitted it. As mentioned previously, it is not the intent of the team to dismiss stalled pull request entirely but to merely to clear up our queue, so a message like the one below is warranted when closing a pull request that went stale:
Hi <contributor>, Hi <contributor>,
First of all, we would like to thank you for your time and effort on working on this, the pytest team deeply appreciates it. First of all we would like to thank you for your time and effort on working on this, the pytest team deeply appreciates it.
We noticed it has been awhile since you have updated this PR, however. pytest is a high activity project, with many issues/PRs being opened daily, so it is hard for us maintainers to track which PRs are ready for merging, for review, or need more attention. We noticed it has been awhile since you have updated this PR, however. pytest is a high activity project, with many issues/PRs being opened daily, so it is hard for us maintainers to track which PRs are ready for merging, for review, or need more attention.
So for those reasons we, think it is best to close the PR for now, but with the only intention to clean up our queue, it is by no means a rejection of your changes. We still encourage you to re-open this PR (it is just a click of a button away) when you are ready to get back to it. So for those reasons we think it is best to close the PR for now, but with the only intention to cleanup our queue, it is by no means a rejection of your changes. We still encourage you to re-open this PR (it is just a click of a button away) when you are ready to get back to it.
Again we appreciate your time for working on this, and hope you might get back to this at a later time! Again we appreciate your time for working on this, and hope you might get back to this at a later time!

View File

@ -1,6 +1,6 @@
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2004 Holger Krekel and others Copyright (c) 2004-2020 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

@ -1,7 +1,6 @@
.. image:: https://github.com/pytest-dev/pytest/raw/main/doc/en/img/pytest_logo_curves.svg .. image:: https://docs.pytest.org/en/stable/_static/pytest1.png
:target: https://docs.pytest.org/en/stable/ :target: https://docs.pytest.org/en/stable/
:align: center :align: center
:height: 200
:alt: pytest :alt: pytest
@ -16,16 +15,18 @@
.. image:: https://img.shields.io/pypi/pyversions/pytest.svg .. image:: https://img.shields.io/pypi/pyversions/pytest.svg
:target: https://pypi.org/project/pytest/ :target: https://pypi.org/project/pytest/
.. image:: https://codecov.io/gh/pytest-dev/pytest/branch/main/graph/badge.svg .. image:: https://codecov.io/gh/pytest-dev/pytest/branch/master/graph/badge.svg
: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/actions/workflows/test.yml/badge.svg .. image:: https://travis-ci.org/pytest-dev/pytest.svg?branch=master
:target: https://github.com/pytest-dev/pytest/actions?query=workflow%3Atest :target: https://travis-ci.org/pytest-dev/pytest
.. image:: https://results.pre-commit.ci/badge/github/pytest-dev/pytest/main.svg .. image:: https://dev.azure.com/pytest-dev/pytest/_apis/build/status/pytest-CI?branchName=master
:target: https://results.pre-commit.ci/latest/github/pytest-dev/pytest/main :target: https://dev.azure.com/pytest-dev/pytest
:alt: pre-commit.ci status
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
.. image:: https://www.codetriage.com/pytest-dev/pytest/badges/users.svg .. image:: https://www.codetriage.com/pytest-dev/pytest/badges/users.svg
:target: https://www.codetriage.com/pytest-dev/pytest :target: https://www.codetriage.com/pytest-dev/pytest
@ -34,15 +35,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.
@ -85,21 +77,21 @@ 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),
test suites out of the box `nose <https://docs.pytest.org/en/stable/nose.html>`_ test suites out of the box;
- Python 3.8+ or PyPy3 - Python 3.5+ and PyPy3;
- Rich plugin architecture, with over 1300+ `external plugins <https://docs.pytest.org/en/latest/reference/plugin_list.html>`_ and thriving community - Rich plugin architecture, with over 850+ `external plugins <http://plugincompat.herokuapp.com>`_ and thriving community;
Documentation Documentation
@ -157,8 +149,8 @@ Tidelift will coordinate the fix and disclosure.
License License
------- -------
Copyright Holger Krekel and others, 2004. Copyright Holger Krekel and others, 2004-2020.
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.
.. _`MIT`: https://github.com/pytest-dev/pytest/blob/main/LICENSE .. _`MIT`: https://github.com/pytest-dev/pytest/blob/master/LICENSE

View File

@ -5,115 +5,37 @@ Our current policy for releasing is to aim for a bug-fix release every few weeks
is to get fixes and new features out instead of trying to cram a ton of features into a release and by consequence is to get fixes and new features out instead of trying to cram a ton of features into a release and by consequence
taking a lot of time to make a new one. taking a lot of time to make a new one.
The git commands assume the following remotes are setup:
* ``origin``: your own fork of the repository.
* ``upstream``: the ``pytest-dev/pytest`` official repository.
Preparing: Automatic Method 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 or issuing a comment one.
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: The comment must be in the form::
- If the "major release" input is set to "yes", release a new major release @pytestbot please prepare release from BRANCH
(e.g. 7.0.0 -> 8.0.0)
- 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 Where ``BRANCH`` is ``master`` or one of the maintenance branches.
^^^^^^^^^^^^^^^^^^^^^^^^^^
Bug-fix and minor releases are always done from a maintenance branch. First, For major releases the comment must be in the form::
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``:: @pytestbot please prepare major release from master
git fetch upstream After that, the workflow should publish a PR and notify that it has done so as a comment
git branch 7.1.x upstream/main in the original issue.
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``::
git fetch upstream
git branch 8.0.x upstream/main
git push upstream 8.0.x
2. Trigger the workflow with the following inputs:
- branch: **8.0.x**
- major release: **yes**
- prerelease: empty
Or via the commandline::
gh workflow run prepare-release-pr.yml -f branch=8.0.x -f major=yes -f prerelease=
The automated workflow will publish a PR for a branch ``release-8.0.0``.
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.
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**
During release candidates we can merge small improvements into
the maintenance branch before releasing the final major version, however we must take care
to avoid introducing big changes at this stage.
Preparing: Manual Method Preparing: Manual Method
~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~
**Important**: pytest releases must be prepared on **Linux** because the docs and examples expect .. important::
to be executed on that platform.
pytest releases must be prepared on **Linux** because the docs and examples expect
to be executed on that platform.
To release a version ``MAJOR.MINOR.PATCH``, follow these steps: To release a version ``MAJOR.MINOR.PATCH``, follow these steps:
#. For major and minor releases, create a new branch ``MAJOR.MINOR.x`` from #. For major and minor releases, create a new branch ``MAJOR.MINOR.x`` from the
``upstream/main`` and push it to ``upstream``. latest ``master`` and push it to the ``pytest-dev/pytest`` repo.
#. Create a branch ``release-MAJOR.MINOR.PATCH`` from the ``MAJOR.MINOR.x`` branch. #. Create a branch ``release-MAJOR.MINOR.PATCH`` from the ``MAJOR.MINOR.x`` branch.
@ -133,32 +55,23 @@ Releasing
Both automatic and manual processes described above follow the same steps from this point onward. Both automatic and manual processes described above follow the same steps from this point onward.
#. After all tests pass and the PR has been approved, trigger the ``deploy`` job #. After all tests pass and the PR has been approved, tag the release commit
in https://github.com/pytest-dev/pytest/actions/workflows/deploy.yml, using the ``release-MAJOR.MINOR.PATCH`` branch in the ``MAJOR.MINOR.x`` branch and push it. This will publish to PyPI::
as source.
This job will require approval from ``pytest-dev/core``, after which it will publish to PyPI git tag MAJOR.MINOR.PATCH
and tag the repository. git push git@github.com:pytest-dev/pytest.git MAJOR.MINOR.PATCH
#. Merge the PR. **Make sure it's not squash-merged**, so that the tagged commit ends up in the main branch. Wait for the deploy to complete, then make sure it is `available on PyPI <https://pypi.org/project/pytest>`_.
#. Cherry-pick the CHANGELOG / announce files to the ``main`` branch:: #. Merge the PR.
git fetch upstream #. Cherry-pick the CHANGELOG / announce files to the ``master`` branch::
git checkout upstream/main -b cherry-pick-release
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. git fetch --all --prune
git checkout origin/master -b cherry-pick-release
#. For major and minor releases (or the first prerelease of it), tag the release cherry-pick merge commit in main with git cherry-pick --no-commit -m1 origin/MAJOR.MINOR.x
a dev tag for the next feature release:: git checkout origin/master -- changelog
git commit # no arguments
git checkout main
git pull
git tag MAJOR.{MINOR+1}.0.dev0
git push upstream 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

@ -23,9 +23,8 @@ members of the `contributors team`_ interested in receiving funding.
The current list of contributors receiving funding are: The current list of contributors receiving funding are:
* `@asottile`_
* `@nicoddemus`_ * `@nicoddemus`_
* `@The-Compiler`_
* `@RonnyPfannschmidt`_
Contributors interested in receiving a part of the funds just need to submit a PR adding their Contributors interested in receiving a part of the funds just need to submit a PR adding their
name to the list. Contributors that want to stop receiving the funds should also submit a PR name to the list. Contributors that want to stop receiving the funds should also submit a PR
@ -55,6 +54,5 @@ funds. Just drop a line to one of the `@pytest-dev/tidelift-admins`_ or use the
.. _`@pytest-dev/tidelift-admins`: https://github.com/orgs/pytest-dev/teams/tidelift-admins/members .. _`@pytest-dev/tidelift-admins`: https://github.com/orgs/pytest-dev/teams/tidelift-admins/members
.. _`agreement`: https://tidelift.com/docs/lifting/agreement .. _`agreement`: https://tidelift.com/docs/lifting/agreement
.. _`@asottile`: https://github.com/asottile
.. _`@nicoddemus`: https://github.com/nicoddemus .. _`@nicoddemus`: https://github.com/nicoddemus
.. _`@The-Compiler`: https://github.com/The-Compiler
.. _`@RonnyPfannschmidt`: https://github.com/RonnyPfannschmidt

View File

@ -1,16 +1,12 @@
from __future__ import annotations
import sys import sys
if __name__ == "__main__": if __name__ == "__main__":
import cProfile import cProfile
import pytest # NOQA
import pstats import pstats
import pytest # noqa: F401
script = sys.argv[1:] if len(sys.argv) > 1 else ["empty.py"] script = sys.argv[1:] if len(sys.argv) > 1 else ["empty.py"]
cProfile.run(f"pytest.cmdline.main({script!r})", "prof") cProfile.run("pytest.cmdline.main(%r)" % script, "prof")
p = pstats.Stats("prof") p = pstats.Stats("prof")
p.strip_dirs() p.strip_dirs()
p.sort_stats("cumulative") p.sort_stats("cumulative")

View File

@ -2,11 +2,8 @@
# 2.7.5 3.3.2 # 2.7.5 3.3.2
# FilesCompleter 75.1109 69.2116 # FilesCompleter 75.1109 69.2116
# FastFilesCompleter 0.7383 1.0760 # FastFilesCompleter 0.7383 1.0760
from __future__ import annotations
import timeit import timeit
imports = [ imports = [
"from argcomplete.completers import FilesCompleter as completer", "from argcomplete.completers import FilesCompleter as completer",
"from _pytest._argcomplete import FastFilesCompleter as completer", "from _pytest._argcomplete import FastFilesCompleter as completer",

View File

@ -1,5 +1,2 @@
from __future__ import annotations
for i in range(1000): for i in range(1000):
exec("def test_func_%d(): pass" % i) exec("def test_func_%d(): pass" % i)

View File

@ -1,5 +1,3 @@
from __future__ import annotations
import pytest import pytest

View File

@ -1,8 +1,5 @@
from __future__ import annotations
import pytest import pytest
SKIP = True SKIP = True

View File

@ -1,16 +0,0 @@
from __future__ import annotations
from unittest import TestCase # noqa: F401
for i in range(15000):
exec(
f"""
class Test{i}(TestCase):
@classmethod
def setUpClass(cls): pass
def test_1(self): pass
def test_2(self): pass
def test_3(self): pass
"""
)

View File

@ -1,14 +0,0 @@
from __future__ import annotations
for i in range(5000):
exec(
f"""
class Test{i}:
@classmethod
def setup_class(cls): pass
def test_1(self): pass
def test_2(self): pass
def test_3(self): pass
"""
)

34
changelog/.gitignore vendored
View File

@ -1,34 +0,0 @@
*
!.gitignore
!_template.rst
!README.rst
!*.bugfix
!*.bugfix.rst
!*.bugfix.*.rst
!*.breaking
!*.breaking.rst
!*.breaking.*.rst
!*.contrib
!*.contrib.rst
!*.contrib.*.rst
!*.deprecation
!*.deprecation.rst
!*.deprecation.*.rst
!*.doc
!*.doc.rst
!*.doc.*.rst
!*.feature
!*.feature.rst
!*.feature.*.rst
!*.improvement
!*.improvement.rst
!*.improvement.*.rst
!*.misc
!*.misc.rst
!*.misc.*.rst
!*.packaging
!*.packaging.rst
!*.packaging.*.rst
!*.vendor
!*.vendor.rst
!*.vendor.*.rst

View File

@ -1,4 +0,0 @@
Fix reporting of teardown errors in higher-scoped fixtures when using `--maxfail` or `--stepwise`.
Originally added in pytest 8.0.0, but reverted in 8.0.2 due to a regression in pytest-xdist.
This regression was fixed in pytest-xdist 3.6.1.

View File

@ -1 +0,0 @@
:func:`pytest.approx` now correctly handles :class:`Sequence <collections.abc.Sequence>`-like objects.

View File

@ -1 +0,0 @@
Documented using :envvar:`PYTEST_VERSION` to detect if code is running from within a pytest run.

View File

@ -1,11 +0,0 @@
Fixed a regression in pytest 8.0 where tracebacks get longer and longer when multiple
tests fail due to a shared higher-scope fixture which raised -- by :user:`bluetech`.
Also fixed a similar regression in pytest 5.4 for collectors which raise during setup.
The fix necessitated internal changes which may affect some plugins:
* ``FixtureDef.cached_result[2]`` is now a tuple ``(exc, tb)``
instead of ``exc``.
* ``SetupState.stack`` failures are now a tuple ``(exc, tb)``
instead of ``exc``.

View File

@ -1,11 +0,0 @@
Added `--xfail-tb` flag, which turns on traceback output for XFAIL results.
* If the `--xfail-tb` flag is not sent, tracebacks for XFAIL results are NOT shown.
* The style of traceback for XFAIL is set with `--tb`, and can be `auto|long|short|line|native|no`.
* Note: Even if you have `--xfail-tb` set, you won't see them if `--tb=no`.
Some history:
With pytest 8.0, `-rx` or `-ra` would not only turn on summary reports for xfail, but also report the tracebacks for xfail results. This caused issues with some projects that utilize xfail, but don't want to see all of the xfail tracebacks.
This change detaches xfail tracebacks from `-rx`, and now we turn on xfail tracebacks with `--xfail-tb`. With this, the default `-rx`/ `-ra` behavior is identical to pre-8.0 with respect to xfail tracebacks. While this is a behavior change, it brings default behavior back to pre-8.0.0 behavior, which ultimately was considered the better course of action.

View File

@ -1 +0,0 @@
12204.bugfix.rst

View File

@ -1 +0,0 @@
Fix collection error upon encountering an :mod:`abstract <abc>` class, including abstract `unittest.TestCase` subclasses.

View File

@ -1,8 +0,0 @@
Added support for keyword matching in marker expressions.
Now tests can be selected by marker keyword arguments.
Supported values are :class:`int`, (unescaped) :class:`str`, :class:`bool` & :data:`None`.
See :ref:`marker examples <marker_keyword_expression_example>` for more information.
-- by :user:`lovetheguitar`

View File

@ -1 +0,0 @@
Fix a regression in pytest 8.0.0 where package-scoped parameterized items were not correctly reordered to minimize setups/teardowns in some cases.

View File

@ -1 +0,0 @@
Fix crash with `assert testcase is not None` assertion failure when re-running unittest tests using plugins like pytest-rerunfailures. Regressed in 8.2.2.

View File

@ -1,3 +0,0 @@
Migrated all internal type-annotations to the python3.10+ style by using the `annotations` future import.
-- by :user:`RonnyPfannschmidt`

View File

@ -1,6 +0,0 @@
The external plugin mentions in the documentation now avoid mentioning
:std:doc:`setuptools entry-points <setuptools:index>` as the concept is
much more generic nowadays. Instead, the terminology of "external",
"installed", or "third-party" plugins (or packages) replaces that.
-- by :user:`webknjaz`

View File

@ -1,4 +0,0 @@
The console output now uses the "third-party plugins" terminology,
replacing the previously established but confusing and outdated
reference to :std:doc:`setuptools <setuptools:index>`
-- by :user:`webknjaz`.

View File

@ -1 +0,0 @@
Fixed a crash when returning category ``"error"`` or ``"failed"`` with a custom test status from :hook:`pytest_report_teststatus` hook -- :user:`pbrezina`.

View File

@ -1,13 +0,0 @@
The change log draft preview integration has been refactored to use a
third party extension ``sphinxcontib-towncrier``. The previous in-repo
script was putting the change log preview file at
:file:`doc/en/_changelog_towncrier_draft.rst`. Said file is no longer
ignored in Git and might show up among untracked files in the
development environments of the contributors. To address that, the
contributors can run the following command that will clean it up:
.. code-block:: console
$ git clean -x -i -- doc/en/_changelog_towncrier_draft.rst
-- by :user:`webknjaz`

View File

@ -1,5 +0,0 @@
All the undocumented ``tox`` environments now have descriptions.
They can be listed in one's development environment by invoking
``tox -av`` in a terminal.
-- by :user:`webknjaz`

View File

@ -1,11 +0,0 @@
The changelog configuration has been updated to introduce more accurate
audience-tailored categories. Previously, there was a ``trivial``
change log fragment type with an unclear and broad meaning. It was
removed and we now have ``contrib``, ``misc`` and ``packaging`` in
place of it.
The new change note types target the readers who are downstream
packagers and project contributors. Additionally, the miscellaneous
section is kept for unspecified updates that do not fit anywhere else.
-- by :user:`webknjaz`

View File

@ -1,7 +0,0 @@
The UX of the GitHub automation making pull requests to update the
plugin list has been updated. Previously, the maintainers had to close
the automatically created pull requests and re-open them to trigger the
CI runs. From now on, they only need to click the `Ready for review`
button instead.
-- by :user:`webknjaz`

View File

@ -1 +0,0 @@
Improve handling of invalid regex patterns in :func:`pytest.raises(match=r'...') <pytest.raises>` by providing a clear error message.

View File

@ -1,4 +0,0 @@
The ``:pull:`` RST role has been replaced with a shorter
``:pr:`` due to starting to use the implementation from
the third-party :pypi:`sphinx-issues` Sphinx extension
-- by :user:`webknjaz`.

View File

@ -1,6 +0,0 @@
The coverage reporting configuration has been updated to exclude
pytest's own tests marked as expected to fail from the coverage
report. This has an effect of reducing the influence of flaky
tests on the resulting number.
-- by :user:`webknjaz`

View File

@ -1,7 +0,0 @@
The ``extlinks`` Sphinx extension is no longer enabled. The ``:bpo:``
role it used to declare has been removed with that. BPO itself has
migrated to GitHub some years ago and it is possible to link the
respective issues by using their GitHub issue numbers and the
``:issue:`` role that the ``sphinx-issues`` extension implements.
-- by :user:`webknjaz`

View File

@ -1,3 +0,0 @@
The ``_in_venv()`` function now detects Python virtual environments by
checking for a :file:`pyvenv.cfg` file, ensuring reliable detection on
various platforms -- by :user:`zachsnickers`.

View File

@ -1 +0,0 @@
12544.improvement.rst

View File

@ -1,2 +0,0 @@
Possible typos in using the ``:user:`` RST role is now being linted
through the pre-commit tool integration -- by :user:`webknjaz`.

View File

@ -1 +0,0 @@
Do not truncate arguments to functions in output when running with `-vvv`.

View File

@ -1,38 +0,0 @@
The readability of assertion introspection of bound methods has been enhanced
-- by :user:`farbodahm`, :user:`webknjaz`, :user:`obestwalter`, :user:`flub`
and :user:`glyphack`.
Earlier, it was like:
.. code-block:: console
=================================== FAILURES ===================================
_____________________________________ test _____________________________________
def test():
> assert Help().fun() == 2
E assert 1 == 2
E + where 1 = <bound method Help.fun of <example.Help instance at 0x256a830>>()
E + where <bound method Help.fun of <example.Help instance at 0x256a830>> = <example.Help instance at 0x256a830>.fun
E + where <example.Help instance at 0x256a830> = Help()
example.py:7: AssertionError
=========================== 1 failed in 0.03 seconds ===========================
And now it's like:
.. code-block:: console
=================================== FAILURES ===================================
_____________________________________ test _____________________________________
def test():
> assert Help().fun() == 2
E assert 1 == 2
E + where 1 = fun()
E + where fun = <test_local.Help object at 0x1074be230>.fun
E + where <test_local.Help object at 0x1074be230> = Help()
test_local.py:13: AssertionError
=========================== 1 failed in 0.03 seconds ===========================

View File

@ -0,0 +1,3 @@
Fixed an internal error crash with ``IndexError: list index out of range`` when
collecting a module which starts with a decorated function, the decorator
raises, and assertion rewriting is enabled.

View File

@ -1 +0,0 @@
Fixed progress percentages (the ``[ 87%]`` at the edge of the screen) sometimes not aligning correctly when running with pytest-xdist ``-n``.

View File

@ -0,0 +1 @@
When a plugin listed in ``required_plugins`` is missing, a simple error message is now shown instead of a stacktrace.

View File

@ -1 +0,0 @@
Added timezone information to the testsuite timestamp in the JUnit XML report.

View File

@ -0,0 +1 @@
Fix INTERNALERROR when accessing locals / globals with faulty ``exec``.

View File

@ -14,28 +14,16 @@ Each file should be named like ``<ISSUE>.<TYPE>.rst``, where
``<ISSUE>`` is an issue number, and ``<TYPE>`` is one of: ``<ISSUE>`` is an issue number, and ``<TYPE>`` is one of:
* ``feature``: new user facing features, like new command-line options and new behavior. * ``feature``: new user facing features, like new command-line options and new behavior.
* ``improvement``: improvement of existing functionality, usually without requiring user intervention (for example, new fields being written in ``--junit-xml``, improved colors in terminal, etc). * ``improvement``: improvement of existing functionality, usually without requiring user intervention (for example, new fields being written in ``--junitxml``, improved colors in terminal, etc).
* ``bugfix``: fixes a bug. * ``bugfix``: fixes a bug.
* ``doc``: documentation improvement, like rewording an entire session or adding missing docs. * ``doc``: documentation improvement, like rewording an entire session or adding missing docs.
* ``deprecation``: feature deprecation. * ``deprecation``: feature deprecation.
* ``breaking``: a change which may break existing suites, such as feature removal or behavior change. * ``breaking``: a change which may break existing suites, such as feature removal or behavior change.
* ``vendor``: changes in packages vendored in pytest. * ``vendor``: changes in packages vendored in pytest.
* ``packaging``: notes for downstreams about unobvious side effects * ``trivial``: fixing a small typo or internal change that might be noteworthy.
and tooling. changes in the test invocation considerations and
runtime assumptions.
* ``contrib``: stuff that affects the contributor experience. e.g.
Running tests, building the docs, setting up the development
environment.
* ``misc``: changes that are hard to assign to any of the above
categories.
So for example: ``123.feature.rst``, ``456.bugfix.rst``. So for example: ``123.feature.rst``, ``456.bugfix.rst``.
.. tip::
See :file:`pyproject.toml` for all available categories
(``tool.towncrier.type``).
If your PR fixes an issue, use that number here. If there is no issue, If your PR fixes an issue, use that number here. If there is no issue,
then after you submit the PR and get the PR number you can add a then after you submit the PR and get the PR number you can add a
changelog using that instead. changelog using that instead.

View File

@ -1,9 +1,4 @@
# reference: https://docs.codecov.io/docs/codecovyml-reference # reference: https://docs.codecov.io/docs/codecovyml-reference
---
codecov:
token: 1eca3b1f-31a2-4fb8-a8c3-138b441b50a7 #repo token
coverage: coverage:
status: status:
patch: true patch: true

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

View File

@ -1,22 +1,16 @@
<h3>Contents</h3> <h3><a href="{{ pathto(master_doc) }}">{{ _('Table Of Contents') }}</a></h3>
<ul> <ul>
<li><a href="{{ pathto('index') }}">Home</a></li> <li><a href="{{ pathto('index') }}">Home</a></li>
<li><a href="{{ pathto('getting-started') }}">Install</a></li>
<li><a href="{{ pathto('getting-started') }}">Get started</a></li> <li><a href="{{ pathto('contents') }}">Contents</a></li>
<li><a href="{{ pathto('how-to/index') }}">How-to guides</a></li> <li><a href="{{ pathto('reference') }}">API Reference</a></li>
<li><a href="{{ pathto('reference/index') }}">Reference guides</a></li> <li><a href="{{ pathto('example/index') }}">Examples</a></li>
<li><a href="{{ pathto('explanation/index') }}">Explanation</a></li> <li><a href="{{ pathto('customize') }}">Customize</a></li>
<li><a href="{{ pathto('contents') }}">Complete table of contents</a></li>
<li><a href="{{ pathto('example/index') }}">Library of examples</a></li>
</ul>
<h3>About the project</h3>
<ul>
<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 +23,5 @@
{%- endif %} {%- endif %}
<hr> <hr>
<a href="{{ pathto('genindex') }}">Index</a>
<hr>

View File

@ -2,6 +2,7 @@
<ul> <ul>
<li><a href="https://pypi.org/project/pytest/">pytest @ PyPI</a></li> <li><a href="https://pypi.org/project/pytest/">pytest @ PyPI</a></li>
<li><a href="https://github.com/pytest-dev/pytest/">pytest @ GitHub</a></li> <li><a href="https://github.com/pytest-dev/pytest/">pytest @ GitHub</a></li>
<li><a href="http://plugincompat.herokuapp.com/">3rd party plugins</a></li>
<li><a href="https://github.com/pytest-dev/pytest/issues">Issue Tracker</a></li> <li><a href="https://github.com/pytest-dev/pytest/issues">Issue Tracker</a></li>
<li><a href="https://media.readthedocs.org/pdf/pytest/latest/pytest.pdf">PDF Documentation</a> <li><a href="https://media.readthedocs.org/pdf/pytest/latest/pytest.pdf">PDF Documentation</a>
</ul> </ul>

View File

@ -1,7 +0,0 @@
<style>
.logo {text-align: center;}
</style>
<a class="logo" href="{{ pathto('contents') }}">
<img src="{{ pathto('_static/pytest1.png', 1) }}" width="70%" height="70%" text="Pytest Logo"/>
</a>

View File

@ -0,0 +1,15 @@
{#
basic/searchbox.html with heading removed.
#}
{%- if pagename != "search" and builder != "singlehtml" %}
<div id="searchbox" style="display: none" role="search">
<div class="searchformwrapper">
<form class="search" action="{{ pathto('search') }}" method="get">
<input type="text" name="q" aria-labelledby="searchlabel"
placeholder="Search"/>
<input type="submit" value="{{ _('Go') }}" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
{%- endif %}

View File

@ -1,7 +0,0 @@
<style>
ul {list-style: none;}
li {margin: 0.4em 0;}
@media (min-width: 46em) {
#features {width: 50%;}
}
</style>

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
@ -44,7 +45,7 @@ Partner projects, sign up here! (by 22 March)
What does it mean to "adopt pytest"? What does it mean to "adopt pytest"?
----------------------------------------- -----------------------------------------
There can be many different definitions of "success". Pytest can run many unittest_ tests by default, so using pytest as your testrunner may be possible from day 1. Job done, right? There can be many different definitions of "success". Pytest can run many `nose and unittest`_ tests by default, so using pytest as your testrunner may be possible from day 1. Job done, right?
Progressive success might look like: Progressive success might look like:
@ -62,7 +63,7 @@ Progressive success might look like:
It may be after the month is up, the partner project decides that pytest is not right for it. That's okay - hopefully the pytest team will also learn something about its weaknesses or deficiencies. It may be after the month is up, the partner project decides that pytest is not right for it. That's okay - hopefully the pytest team will also learn something about its weaknesses or deficiencies.
.. _unittest: unittest.html .. _`nose and unittest`: faq.html#how-does-pytest-relate-to-nose-and-unittest
.. _assert: assert.html .. _assert: assert.html
.. _pycmd: https://bitbucket.org/hpk42/pycmd/overview .. _pycmd: https://bitbucket.org/hpk42/pycmd/overview
.. _`setUp/tearDown methods`: xunit_setup.html .. _`setUp/tearDown methods`: xunit_setup.html

View File

@ -6,44 +6,6 @@ Release announcements
:maxdepth: 2 :maxdepth: 2
release-8.2.2
release-8.2.1
release-8.2.0
release-8.1.2
release-8.1.1
release-8.1.0
release-8.0.2
release-8.0.1
release-8.0.0
release-8.0.0rc2
release-8.0.0rc1
release-7.4.4
release-7.4.3
release-7.4.2
release-7.4.1
release-7.4.0
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.3
release-6.2.2
release-6.2.1
release-6.2.0
release-6.1.2
release-6.1.1
release-6.1.0
release-6.0.2 release-6.0.2
release-6.0.1 release-6.0.1
release-6.0.0 release-6.0.0

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
@ -62,7 +62,7 @@ New Features
- new "-q" option which decreases verbosity and prints a more - new "-q" option which decreases verbosity and prints a more
nose/unittest-style "dot" output. nose/unittest-style "dot" output.
- many, many, more detailed improvements details - many many more detailed improvements details
Fixes Fixes
----------------------- -----------------------
@ -109,7 +109,7 @@ Important Notes
in conftest.py files. They will cause nothing special. in conftest.py files. They will cause nothing special.
- removed support for calling the pre-1.0 collection API of "run()" and "join" - removed support for calling the pre-1.0 collection API of "run()" and "join"
- removed reading option values from conftest.py files or env variables. - removed reading option values from conftest.py files or env variables.
This can now be done much, much, better and easier through the ini-file This can now be done much much better and easier through the ini-file
mechanism and the "addopts" entry in particular. mechanism and the "addopts" entry in particular.
- removed the "disabled" attribute in test classes. Use the skipping - removed the "disabled" attribute in test classes. Use the skipping
and pytestmark mechanism to skip or xfail a test class. and pytestmark mechanism to skip or xfail a test class.

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.
@ -24,7 +24,7 @@ If you want to install or upgrade pytest, just type one of::
easy_install -U pytest easy_install -U pytest
best, best,
holger krekel / https://merlinux.eu/ holger krekel / http://merlinux.eu
Changes between 2.0.3 and 2.1.0 Changes between 2.0.3 and 2.1.0
---------------------------------------------- ----------------------------------------------

View File

@ -20,7 +20,7 @@ If you want to install or upgrade pytest, just type one of::
easy_install -U pytest easy_install -U pytest
best, best,
holger krekel / https://merlinux.eu/ holger krekel / http://merlinux.eu
Changes between 2.1.0 and 2.1.1 Changes between 2.1.0 and 2.1.1
---------------------------------------------- ----------------------------------------------

View File

@ -19,7 +19,7 @@ If you want to install or upgrade pytest, just type one of::
easy_install -U pytest easy_install -U pytest
best, best,
holger krekel / https://merlinux.eu/ holger krekel / http://merlinux.eu
Changes between 2.1.1 and 2.1.2 Changes between 2.1.1 and 2.1.2
---------------------------------------- ----------------------------------------

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

@ -4,7 +4,7 @@ pytest-2.2.2: bug fixes
pytest-2.2.2 (updated to 2.2.3 to fix packaging issues) is a minor pytest-2.2.2 (updated to 2.2.3 to fix packaging issues) is a minor
backward-compatible release of the versatile py.test testing tool. It backward-compatible release of the versatile py.test testing tool. It
contains bug fixes and a few refinements particularly to reporting with contains bug fixes and a few refinements particularly to reporting with
"--collectonly", see below for details. "--collectonly", see below for betails.
For general information see here: For general information see here:

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.
@ -94,7 +94,7 @@ Changes between 2.2.4 and 2.3.0
- pluginmanager.register(...) now raises ValueError if the - pluginmanager.register(...) now raises ValueError if the
plugin has been already registered or the name is taken plugin has been already registered or the name is taken
- fix issue159: improve https://docs.pytest.org/en/6.0.1/faq.html - fix issue159: improve http://pytest.org/en/stable/faq.html
especially with respect to the "magic" history, also mention especially with respect to the "magic" history, also mention
pytest-django, trial and unittest integration. pytest-django, trial and unittest integration.

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
@ -181,7 +182,7 @@ Bug fixes:
partially failed (finalizers would not always be called before) partially failed (finalizers would not always be called before)
- fix issue320 - fix class scope for fixtures when mixed with - fix issue320 - fix class scope for fixtures when mixed with
module-level functions. Thanks Anatoly Bubenkoff. module-level functions. Thanks Anatloy Bubenkoff.
- you can specify "-q" or "-qq" to get different levels of "quieter" - you can specify "-q" or "-qq" to get different levels of "quieter"
reporting (thanks Katarzyna Jachim) reporting (thanks Katarzyna Jachim)

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
@ -83,7 +83,7 @@ holger krekel
Thanks Ralph Schmitt for the precise failure example. Thanks Ralph Schmitt for the precise failure example.
- fix issue244 by implementing special index for parameters to only use - fix issue244 by implementing special index for parameters to only use
indices for parametrized test ids indices for paramentrized test ids
- fix issue287 by running all finalizers but saving the exception - fix issue287 by running all finalizers but saving the exception
from the first failing finalizer and re-raising it so teardown will from the first failing finalizer and re-raising it so teardown will

View File

@ -1,7 +1,7 @@
pytest-2.5.1: fixes and new home page styling pytest-2.5.1: fixes and new home page styling
=========================================================================== ===========================================================================
pytest is a mature Python testing tool with more than 1000 tests pytest is a mature Python testing tool with more than a 1000 tests
against itself, passing on many different interpreters and platforms. against itself, passing on many different interpreters and platforms.
The 2.5.1 release maintains the "zero-reported-bugs" promise by fixing The 2.5.1 release maintains the "zero-reported-bugs" promise by fixing

View File

@ -1,7 +1,7 @@
pytest-2.5.2: fixes pytest-2.5.2: fixes
=========================================================================== ===========================================================================
pytest is a mature Python testing tool with more than 1000 tests pytest is a mature Python testing tool with more than a 1000 tests
against itself, passing on many different interpreters and platforms. against itself, passing on many different interpreters and platforms.
The 2.5.2 release fixes a few bugs with two maybe-bugs remaining and The 2.5.2 release fixes a few bugs with two maybe-bugs remaining and

View File

@ -1,7 +1,7 @@
pytest-2.6.0: shorter tracebacks, new warning system, test runner compat pytest-2.6.0: shorter tracebacks, new warning system, test runner compat
=========================================================================== ===========================================================================
pytest is a mature Python testing tool with more than 1000 tests pytest is a mature Python testing tool with more than a 1000 tests
against itself, passing on many different interpreters and platforms. against itself, passing on many different interpreters and platforms.
The 2.6.0 release should be drop-in backward compatible to 2.5.2 and The 2.6.0 release should be drop-in backward compatible to 2.5.2 and
@ -73,7 +73,7 @@ holger krekel
- cleanup setup.py a bit and specify supported versions. Thanks Jurko - cleanup setup.py a bit and specify supported versions. Thanks Jurko
Gospodnetic for the PR. Gospodnetic for the PR.
- change XPASS colour to yellow rather than red when tests are run - change XPASS colour to yellow rather then red when tests are run
with -v. with -v.
- fix issue473: work around mock putting an unbound method into a class - fix issue473: work around mock putting an unbound method into a class

View File

@ -1,7 +1,7 @@
pytest-2.6.1: fixes and new xfail feature pytest-2.6.1: fixes and new xfail feature
=========================================================================== ===========================================================================
pytest is a mature Python testing tool with more than 1100 tests pytest is a mature Python testing tool with more than a 1100 tests
against itself, passing on many different interpreters and platforms. against itself, passing on many different interpreters and platforms.
The 2.6.1 release is drop-in compatible to 2.5.2 and actually fixes some The 2.6.1 release is drop-in compatible to 2.5.2 and actually fixes some
regressions introduced with 2.6.0. It also brings a little feature regressions introduced with 2.6.0. It also brings a little feature

View File

@ -1,7 +1,7 @@
pytest-2.6.2: few fixes and cx_freeze support pytest-2.6.2: few fixes and cx_freeze support
=========================================================================== ===========================================================================
pytest is a mature Python testing tool with more than 1100 tests pytest is a mature Python testing tool with more than a 1100 tests
against itself, passing on many different interpreters and platforms. against itself, passing on many different interpreters and platforms.
This release is drop-in compatible to 2.5.2 and 2.6.X. It also This release is drop-in compatible to 2.5.2 and 2.6.X. It also
brings support for including pytest with cx_freeze or similar brings support for including pytest with cx_freeze or similar

View File

@ -1,7 +1,7 @@
pytest-2.6.3: fixes and little improvements pytest-2.6.3: fixes and little improvements
=========================================================================== ===========================================================================
pytest is a mature Python testing tool with more than 1100 tests pytest is a mature Python testing tool with more than a 1100 tests
against itself, passing on many different interpreters and platforms. against itself, passing on many different interpreters and platforms.
This release is drop-in compatible to 2.5.2 and 2.6.X. This release is drop-in compatible to 2.5.2 and 2.6.X.
See below for the changes and see docs at: See below for the changes and see docs at:

View File

@ -1,7 +1,7 @@
pytest-2.7.0: fixes, features, speed improvements pytest-2.7.0: fixes, features, speed improvements
=========================================================================== ===========================================================================
pytest is a mature Python testing tool with more than 1100 tests pytest is a mature Python testing tool with more than a 1100 tests
against itself, passing on many different interpreters and platforms. against itself, passing on many different interpreters and platforms.
This release is supposed to be drop-in compatible to 2.6.X. This release is supposed to be drop-in compatible to 2.6.X.
@ -55,7 +55,7 @@ holger krekel
github. See https://pytest.org/en/stable/contributing.html . github. See https://pytest.org/en/stable/contributing.html .
Thanks to Anatoly for pushing and initial work on this. Thanks to Anatoly for pushing and initial work on this.
- fix issue650: new option ``--doctest-ignore-import-errors`` which - fix issue650: new option ``--docttest-ignore-import-errors`` which
will turn import errors in doctests into skips. Thanks Charles Cloud will turn import errors in doctests into skips. Thanks Charles Cloud
for the complete PR. for the complete PR.

View File

@ -1,7 +1,7 @@
pytest-2.7.1: bug fixes pytest-2.7.1: bug fixes
======================= =======================
pytest is a mature Python testing tool with more than 1100 tests pytest is a mature Python testing tool with more than a 1100 tests
against itself, passing on many different interpreters and platforms. against itself, passing on many different interpreters and platforms.
This release is supposed to be drop-in compatible to 2.7.0. This release is supposed to be drop-in compatible to 2.7.0.

View File

@ -1,7 +1,7 @@
pytest-2.7.2: bug fixes pytest-2.7.2: bug fixes
======================= =======================
pytest is a mature Python testing tool with more than 1100 tests pytest is a mature Python testing tool with more than a 1100 tests
against itself, passing on many different interpreters and platforms. against itself, passing on many different interpreters and platforms.
This release is supposed to be drop-in compatible to 2.7.1. This release is supposed to be drop-in compatible to 2.7.1.

View File

@ -1,7 +1,7 @@
pytest-2.8.2: bug fixes pytest-2.8.2: bug fixes
======================= =======================
pytest is a mature Python testing tool with more than 1100 tests pytest is a mature Python testing tool with more than a 1100 tests
against itself, passing on many different interpreters and platforms. against itself, passing on many different interpreters and platforms.
This release is supposed to be drop-in compatible to 2.8.1. This release is supposed to be drop-in compatible to 2.8.1.

View File

@ -1,7 +1,7 @@
pytest-2.8.3: bug fixes pytest-2.8.3: bug fixes
======================= =======================
pytest is a mature Python testing tool with more than 1100 tests pytest is a mature Python testing tool with more than a 1100 tests
against itself, passing on many different interpreters and platforms. against itself, passing on many different interpreters and platforms.
This release is supposed to be drop-in compatible to 2.8.2. This release is supposed to be drop-in compatible to 2.8.2.

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