pytest bot
4191e02598
Prepare release version 7.2.2
2023-03-03 17:05:52 +00:00
github-actions[bot]
eb50c6ce99
[7.2.x] Normalize how changelog entries are written ( #10790 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com >
2023-03-03 16:26:35 +00:00
github-actions[bot]
9693556f27
[7.2.x] Fix test_cmdline_python_namespace_package ( #10789 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com >
2023-03-03 15:52:49 +00:00
github-actions[bot]
e8e7d44a4c
[7.2.x] made minor updates to fixtures docs ( #10778 )
...
Co-authored-by: Billy <william.j.kern@gmail.com >
2023-02-28 16:08:54 +00:00
github-actions[bot]
2fd4549db5
[7.2.x] docs: be more explicit about module level skip preventing collection ( #10777 )
...
Co-authored-by: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de >
2023-02-28 16:03:47 +00:00
github-actions[bot]
cee8d6f274
[7.2.x] Update import mode documentation to not refer to __import__() anymore. ( #10751 )
...
Co-authored-by: Manuel Jacob <me@manueljacob.de >
2023-02-18 18:57:56 -03:00
github-actions[bot]
79108bf9a3
[7.2.x] add CI and BUILD_NUMBER env var in docs ( #10750 )
...
Co-authored-by: bitzge <4791819+bitzge@users.noreply.github.com >
2023-02-18 18:57:28 -03:00
github-actions[bot]
779a87aada
[7.2.x] Update open training ( #10740 )
...
Co-authored-by: Florian Bruhin <me@the-compiler.org >
2023-02-15 16:07:30 +01:00
Bruno Oliveira
60216810d9
Merge pull request #10734 from pytest-dev/backport-10725-to-7.2.x
...
[7.2.x] Fix entry-points declaration in the documentation example using Hatch
2023-02-14 12:10:39 -03:00
Garvit Shubham
37e410fce8
[7.2.x] Fix entry-points declaration in the documentation example using Hatch
2023-02-14 14:01:18 +00:00
Bruno Oliveira
0aeb843e25
Merge pull request #10729 from nicoddemus/backport-10722
...
[7.2.x] Use build-and-inspect-python-package action (#10722 )
2023-02-14 10:57:58 -03:00
Bruno Oliveira
1e83bd8386
Use build-and-inspect-python-package action ( #10722 )
...
This uses https://github.com/hynek/build-and-inspect-python-package to ensure our package is correct, both during testing and deploy,
2023-02-12 21:42:24 -03:00
Bruno Oliveira
02e9e8403e
Merge pull request #10715 from pytest-dev/backport-10713-to-7.2.x
...
[7.2.x] DOCS-#10687: Add a note about -W vs filterwarnings.
2023-02-07 19:55:03 -03:00
Mahesh Vashishtha
7e1549dfb6
[7.2.x] DOCS-#10687: Add a note about -W vs filterwarnings.
2023-02-07 22:29:03 +00:00
Bruno Oliveira
d61f83c030
Merge pull request #10698 from pytest-dev/backport-10696-to-7.2.x
...
[7.2.x] Fix fixtures named teardown being considered by nose
2023-01-27 14:58:14 -03:00
Teejay
432a60bd52
[7.2.x] Fix fixtures named teardown being considered by nose
2023-01-27 17:35:34 +00:00
Bruno Oliveira
4b83a05939
Merge pull request #10697 from pytest-dev/backport-10695-to-7.2.x
...
[7.2.x] Clarify docs for `match` regarding escaping
2023-01-27 08:47:14 -03:00
vin01
4e14609b99
[7.2.x] Clarify docs for match regarding escaping
2023-01-27 11:13:22 +00:00
github-actions[bot]
76bef68f3e
[7.2.x] Add check for zero denominator in approx ( #10689 )
...
Co-authored-by: Jay <43951088+jayendra-patil33@users.noreply.github.com >
2023-01-24 10:30:54 +00:00
Bruno Oliveira
af22d34158
Merge pull request #10681 from pytest-dev/backport-10664-to-7.2.x
...
[7.2.x] Check if config args and args_source exist
2023-01-21 08:46:56 -03:00
q0w
d1b9660402
[7.2.x] Check if config args and args_source exist
2023-01-21 11:21:12 +00:00
Bruno Oliveira
9c103aef2f
Merge pull request #10673 from pytest-dev/backport-10660-to-7.2.x
...
[7.2.x] Derive pytest.raises from AbstractContextManager
2023-01-19 16:44:28 -03:00
Bruno Oliveira
624ae81eb1
Merge pull request #10675 from nicoddemus/backport-10608-to-7.2.x
...
[7.2.x] Fix crash if `--cache-show` and `--help` are passed at the same time
2023-01-19 11:35:09 -03:00
Ramsey
5bf361f24e
Fix crash if --cache-show and --help are passed at the same time
...
Closes #10592
(cherry picked from commit 4d4ed42c34 )
2023-01-19 10:06:05 -03:00
Ronny Pfannschmidt
baa938eea5
[7.2.x] Derive pytest.raises from AbstractContextManager
2023-01-18 05:44:44 +00:00
Bruno Oliveira
94c05bc2a4
Merge pull request #10659 from pytest-dev/release-7.2.1
...
Prepare release 7.2.1
2023-01-14 09:20:20 -03:00
pytest bot
1ae778f13e
Prepare release version 7.2.1
2023-01-13 11:01:33 +00:00
Bruno Oliveira
cb07711846
Merge pull request #10656 from pytest-dev/backport-10641-to-7.2.x
...
[7.2.x] Dont update cache from xdist worker
2023-01-13 07:50:57 -03:00
Bruno Oliveira
944070259e
Merge pull request #10657 from pytest-dev/backport-10640-to-7.2.x
...
[7.2.x] Fix regen tox environment
2023-01-13 07:22:04 -03:00
Bruno Oliveira
e8055c1609
[7.2.x] Fix regen tox environment
2023-01-13 10:20:49 +00:00
s-padmanaban
f22fbbf9f1
[7.2.x] Dont update cache from xdist worker
2023-01-13 10:16:42 +00:00
Bruno Oliveira
211d08e9bc
Merge pull request #10638 from pytest-dev/backport-10607-to-7.2.x
...
[7.2.x] Mitigate directory creation race condition
2023-01-06 09:33:55 -03:00
Kadino
a6f85a0e3e
[7.2.x] Mitigate directory creation race condition
2023-01-06 12:13:46 +00:00
Bruno Oliveira
08d0dd06ac
Merge pull request #10637 from pytest-dev/backport-10632-to-7.2.x
...
[7.2.x] Fix tests pygments 2.14.0
2023-01-05 13:20:53 -03:00
Bruno Oliveira
405fd15128
[7.2.x] Fix tests pygments 2.14.0
2023-01-05 15:59:54 +00:00
Bruno Oliveira
c16315f5c3
Merge pull request #10586 from nicoddemus/backport-10578
...
[7.2.x] Fix tox 4.0 support and docs
2022-12-14 14:58:44 -03:00
Bruno Oliveira
f1989747b7
Fix tox 4.0 support and docs
...
Also includes pre-commit autoupdate
2022-12-14 09:09:43 -03:00
Bruno Oliveira
7d35baaa3c
Merge pull request #10529 from pytest-dev/backport-10526-to-7.2.x
...
[7.2.x] Issue #10506
2022-11-23 15:47:02 -03:00
Prerak Patel
c3b0080c87
[7.2.x] Issue #10506
2022-11-23 17:49:15 +00:00
Bruno Oliveira
3c2f90b9b9
Merge pull request #10513 from pytest-dev/backport-10482-to-7.2.x
...
[7.2.x] issue-10457/show test name when skipping from fixture
2022-11-18 10:06:57 -03:00
Daniel Valenzuela
f5d2edc1fc
[7.2.x] issue-10457/show test name when skipping from fixture
2022-11-18 12:22:15 +00:00
Bruno Oliveira
47d6adf890
Merge pull request #10489 from pytest-dev/backport-10488-to-7.2.x
...
[7.2.x] Fix test_raising_repr test
2022-11-09 20:46:56 -03:00
Bruno Oliveira
dbd4c5fb2f
[7.2.x] Fix test_raising_repr test
2022-11-09 23:21:32 +00:00
github-actions[bot]
b2271afa65
[7.2.x] Remove done trainings ( #10472 )
...
Co-authored-by: Florian Bruhin <me@the-compiler.org >
2022-11-04 18:50:45 +01:00
github-actions[bot]
6a5076db9f
[7.2.x] Fix 'importlib.abc.TraversableResources' deprecation warning in Python 3.12 ( #10453 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com >
2022-10-31 16:16:34 +00:00
Bruno Oliveira
8606feb3a4
Merge pull request #10431 from pytest-dev/backport-10426-to-7.2.x
...
[7.2.x] Add the PyPI classifier for Python 3.11
2022-10-25 15:53:46 -03:00
Bruno Oliveira
6a4a0f43b5
Merge pull request #10430 from pytest-dev/backport-10425-to-7.2.x
...
[7.2.x] upgrade pygments-pytest for 7.2.x coloring
2022-10-25 15:32:05 -03:00
Bruno Oliveira
eff2e2decd
Merge pull request #10432 from nicoddemus/backport-10417
...
[2.7.x] Use specific tag in the gh-action-pypi-publish action
2022-10-25 15:21:08 -03:00
Bruno Oliveira
23bbd5a628
Merge pull request #10417 from nicoddemus/publish-action-pin
...
Use specific tag in the gh-action-pypi-publish action
2022-10-25 18:19:53 -03:00
github-actions[bot]
651c7bf932
[7.2.x] Edit changelog for 7.2.0 ( #10429 )
...
Co-authored-by: Florian Bruhin <me@the-compiler.org >
2022-10-25 18:11:35 +00:00
Santiago Castro
1f08cd7225
[7.2.x] Add the PyPI classifier for Python 3.11
2022-10-25 18:10:30 +00:00
Anthony Sottile
5c6a9a6504
[7.2.x] upgrade pygments-pytest for 7.2.x coloring
2022-10-25 17:53:54 +00:00
Ronny Pfannschmidt
ac4e3cced9
Merge pull request #10412 from pytest-dev/release-7.2.0
...
Prepare release 7.2.0
2022-10-25 10:58:30 +02:00
pytest bot
3af3f569d5
Prepare release version 7.2.0
2022-10-23 20:28:15 +00:00
Bruno Oliveira
bc2c3b66aa
Merge pull request #10408 from NateMeyvis/patch-2
...
Fix typos in CONTRIBUTING.rst
2022-10-22 10:01:04 -03:00
Bruno Oliveira
d84ed48f39
Merge pull request #10409 from pytest-dev/asottile-patch-1
...
allow jobs to pass if codecov.io fails
2022-10-22 10:00:32 -03:00
Anthony Sottile
ffe49ac17c
Merge pull request #10396 from pytest-dev/pylib-hax
...
vendor py.path and py.error
2022-10-21 13:37:32 -04:00
Anthony Sottile
d352098261
allow jobs to pass if codecov.io fails
2022-10-21 13:11:43 -04:00
Nate Meyvis
c5c562b645
Fix typos in CONTRIBUTING.rst
...
Fix small grammatical issues in CONTRIBUTING.rst to improve readability.
2022-10-21 13:06:44 -04:00
Anthony Sottile
d543a45a68
add deprecation changelog for py library vendoring
2022-10-21 12:46:15 -04:00
Bruno Oliveira
f341a5c559
Merge pull request #10407 from NateMeyvis/patch-1
...
Add note on tags to CONTRIBUTING.rst
2022-10-21 13:11:36 -03:00
pre-commit-ci[bot]
1027dc8c09
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2022-10-21 15:18:44 +00:00
Nate Meyvis
6b905ee6dc
Add note on tags to CONTRIBUTING.rst
...
Tags from the main repository are required for testing to work properly, but the current documentation does not reflect this, and at least one new contributor has been tripped up by this. Update the documentation with a short explanation and directions.
2022-10-21 11:17:01 -04:00
Anthony Sottile
508be0b2bf
add -pylib tox environment
2022-10-20 17:15:57 -04:00
Anthony Sottile
02a9371259
adjust tests if py library is installed
2022-10-19 22:28:51 -04:00
Anthony Sottile
dc0cb0d149
fix test pollution of sys.modules
2022-10-19 22:18:50 -04:00
Anthony Sottile
82344ba4f8
add py.path.local tests
2022-10-19 21:42:40 -04:00
Anthony Sottile
59d8f8a223
_pytest._py.path: get mypy passing
2022-10-19 21:42:40 -04:00
Anthony Sottile
ed4c18f686
_pytest._py.path: combine PathBase and LocalPath
2022-10-19 21:42:40 -04:00
Anthony Sottile
6660d45521
_pytest._py.path: combine PosixPath into LocalPath
2022-10-19 21:42:40 -04:00
Anthony Sottile
af078f3a96
_pytest._py.path: combine Checkers classes
2022-10-19 21:42:40 -04:00
Anthony Sottile
73349ef3e1
_pytest._py.path: flake8 fixes
2022-10-19 21:42:40 -04:00
Anthony Sottile
63c4d45c59
_pytest._py.path: importlib mode always available
2022-10-19 21:42:40 -04:00
Anthony Sottile
eebbfc65c9
_pytest._py.error: mypy typing
2022-10-19 21:42:40 -04:00
Anthony Sottile
382209d9e9
_pytest._py.path: remove decorator compat
2022-10-19 16:52:26 -04:00
Anthony Sottile
00e2f1c15c
_pytest._py.path: remove _cmp compat
2022-10-19 16:52:26 -04:00
Anthony Sottile
8a151774b8
_pytest._py.path: remove fspath compat
2022-10-19 16:52:26 -04:00
Anthony Sottile
a7c1fc204b
remove other py.* accesses in _pytest._py.path
2022-10-19 16:52:26 -04:00
Anthony Sottile
965e942dfb
use getrawcode from _pytest._code
2022-10-19 16:52:26 -04:00
Anthony Sottile
349f4bffa0
use module __getattr__ for py.error to fix doctesting
2022-10-19 16:52:26 -04:00
pre-commit-ci[bot]
49abbf2485
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2022-10-19 16:52:26 -04:00
Anthony Sottile
19dda7c9bd
vendor py.path and py.error
2022-10-19 16:52:26 -04:00
Bruno Oliveira
baada535a3
Merge pull request #10389 from pytest-dev/pre-commit-ci-update-config
...
[pre-commit.ci] pre-commit autoupdate
2022-10-18 07:46:47 -03:00
pre-commit-ci[bot]
c477ecd146
[pre-commit.ci] pre-commit autoupdate
...
updates:
- [github.com/PyCQA/autoflake: v1.7.3 → v1.7.6](https://github.com/PyCQA/autoflake/compare/v1.7.3...v1.7.6 )
- [github.com/asottile/reorder_python_imports: v3.8.4 → v3.8.5](https://github.com/asottile/reorder_python_imports/compare/v3.8.4...v3.8.5 )
- [github.com/asottile/setup-cfg-fmt: v2.0.0 → v2.1.0](https://github.com/asottile/setup-cfg-fmt/compare/v2.0.0...v2.1.0 )
2022-10-17 23:48:17 +00:00
Bruno Oliveira
36d19f2135
Merge pull request #10388 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-twisted-1.14.0
...
build(deps): Bump pytest-twisted from 1.13.4 to 1.14.0 in /testing/plugins_integration
2022-10-17 11:04:12 -03:00
dependabot[bot]
8490ff5277
build(deps): Bump pytest-twisted in /testing/plugins_integration
...
Bumps [pytest-twisted](https://github.com/pytest-dev/pytest-twisted ) from 1.13.4 to 1.14.0.
- [Release notes](https://github.com/pytest-dev/pytest-twisted/releases )
- [Commits](https://github.com/pytest-dev/pytest-twisted/compare/v1.13.4...v1.14.0 )
---
updated-dependencies:
- dependency-name: pytest-twisted
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-10-17 03:02:02 +00:00
Zac Hatfield-Dodds
3dac833a52
Merge pull request #10383 from gabriellandau/dont-pdb-break-for-skiptest-exceptions
2022-10-15 11:14:26 -07:00
Zac Hatfield-Dodds
36b6384ff2
Merge pull request #10384 from tony/showlocals-negation
2022-10-15 10:43:59 -07:00
Ronny Pfannschmidt
31df38f6a7
Merge pull request #10356 from RonnyPfannschmidt/fix-7792-marks-walk-mro
...
fix #7792 : consider marks from the mro
2022-10-15 17:19:27 +02:00
Tony Narlock
2a33e6ab61
docs: Update changelog for --no-show-locals
2022-10-14 17:20:36 -05:00
Tony Narlock
7fada7127e
docs(output): Note --no-show-locals
2022-10-14 16:38:14 -05:00
Tony Narlock
3a8d401ac7
test(--no-showlocals): Should hide locals when addopts=--showlocals
2022-10-14 16:25:15 -05:00
Tony Narlock
2b6622fdd3
🔧 Negating --showlocals with --no-showlocals
...
This is necessary for addopts=--showlocals where individual test runs
need to not show locals.
2022-10-14 16:19:07 -05:00
Gabriel Landau
0bc9ffcc87
Add Gabriel Landau to AUTHORS
2022-10-14 14:01:20 -04:00
Gabriel Landau
f3d7e984ab
Changelog
2022-10-14 13:58:59 -04:00
Gabriel Landau
452617686c
Test fix
2022-10-14 13:53:06 -04:00
Gabriel Landau
6e7917c1a0
Don't break into pdb for raise unittest.SkipTest()
2022-10-13 18:20:46 -04:00
Bruno Oliveira
15ac0349b2
Merge pull request #10373 from ofek/patch-1
...
Fix packaging example
2022-10-12 22:19:41 -03:00
Ofek Lev
86602ce6e0
Fix packaging example
2022-10-12 11:51:26 -04:00
pre-commit-ci[bot]
c543e0c4e8
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2022-10-12 08:21:17 +00:00
Ronny Pfannschmidt
f13f4360d3
Apply suggestions from code review
...
Co-authored-by: Ran Benita <ran@unusedvar.com >
2022-10-12 10:20:16 +02:00
Bruno Oliveira
b7d4de1ea9
Merge pull request #10368 from pytest-dev/pre-commit-ci-update-config
...
[pre-commit.ci] pre-commit autoupdate
2022-10-11 08:17:05 -03:00
Bruno Oliveira
a9c66172d4
Update to autoflake to 1.7.3
...
Fixes PyCQA/autoflake#168
2022-10-11 08:11:15 -03:00
pre-commit-ci[bot]
3de63f9a9b
[pre-commit.ci] pre-commit autoupdate
...
updates:
- [github.com/psf/black: 22.8.0 → 22.10.0](https://github.com/psf/black/compare/22.8.0...22.10.0 )
- [github.com/PyCQA/autoflake: v1.6.1 → v1.7.2](https://github.com/PyCQA/autoflake/compare/v1.6.1...v1.7.2 )
- [github.com/asottile/reorder_python_imports: v3.8.3 → v3.8.4](https://github.com/asottile/reorder_python_imports/compare/v3.8.3...v3.8.4 )
- [github.com/asottile/pyupgrade: v2.38.2 → v3.1.0](https://github.com/asottile/pyupgrade/compare/v2.38.2...v3.1.0 )
- [github.com/pre-commit/mirrors-mypy: v0.981 → v0.982](https://github.com/pre-commit/mirrors-mypy/compare/v0.981...v0.982 )
2022-10-11 00:32:50 +00:00
Bruno Oliveira
f5797abb62
Merge pull request #10361 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-mock-3.10.0
...
build(deps): Bump pytest-mock from 3.9.0 to 3.10.0 in /testing/plugins_integration
2022-10-10 08:03:35 -03:00
Bruno Oliveira
b735f9377a
Merge pull request #10360 from pytest-dev/dependabot/pip/testing/plugins_integration/django-4.1.2
...
build(deps): Bump django from 4.1.1 to 4.1.2 in /testing/plugins_integration
2022-10-10 08:03:24 -03:00
dependabot[bot]
d8c5e8805f
build(deps): Bump pytest-mock in /testing/plugins_integration
...
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock ) from 3.9.0 to 3.10.0.
- [Release notes](https://github.com/pytest-dev/pytest-mock/releases )
- [Changelog](https://github.com/pytest-dev/pytest-mock/blob/main/CHANGELOG.rst )
- [Commits](https://github.com/pytest-dev/pytest-mock/compare/v3.9.0...v3.10.0 )
---
updated-dependencies:
- dependency-name: pytest-mock
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-10-10 03:03:48 +00:00
dependabot[bot]
07b380bb3a
build(deps): Bump django in /testing/plugins_integration
...
Bumps [django](https://github.com/django/django ) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/django/django/releases )
- [Commits](https://github.com/django/django/compare/4.1.1...4.1.2 )
---
updated-dependencies:
- dependency-name: django
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-10-10 03:03:45 +00:00
itxasos23
78c2c48c67
Handle NFC/NFD strings that normalize to the same string. ( #10355 )
...
Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com >
2022-10-09 17:09:33 -07:00
Thomas Grainger
8a40fc5315
PytestReturnNotNoneWarning now subclasses PytestRemovedIn8Warning ( #10196 )
...
As discussed in https://github.com/pytest-dev/pytest/pull/9956#issuecomment-1132710934 .
Also added PytestRemovedIn8Warning to the reference docs.
2022-10-09 20:10:45 -03:00
Vivaan Verma
196f01965e
Replace entrypoint example with pyproject.toml in docs ( #10359 )
...
Fixes #10344
2022-10-09 17:42:42 -03:00
Simon K
3bf2bc55b1
Add deprecations for tests written for nose ( #9907 )
...
Fixes #9886
2022-10-09 17:16:33 -03:00
Bruno Oliveira
571dc6b220
Merge pull request #10358 from drakulavich/patch-1
2022-10-09 10:07:17 -03:00
Anton Yakutovich
d0abfb1c2a
Bump actions in test.yml
2022-10-09 16:27:35 +04:00
Ran Benita
81113c1a90
Merge pull request #10354 from pytest-dev/revert-10346-ci-pat
...
Revert "ci: fix PR not triggering workflows by switching back to pytestbot access token"
2022-10-08 16:31:26 +03:00
Bruno Oliveira
784ba85b17
Merge pull request #10331 from sgaist/add_modernization_tip_for_tmpdir_and_tmpdir_factory
2022-10-08 09:54:21 -03:00
Samuel Gaist
a28d595b46
doc: add note to help modernize code bases to use pathlib
...
Fixes #10199
2022-10-08 10:18:08 +02:00
Ronny Pfannschmidt
c42bb36009
fixup: mark mro test reformatt
2022-10-08 08:35:53 +02:00
Ronny Pfannschmidt
13e594a314
fixup: mark mro test reformatt
2022-10-08 08:35:26 +02:00
Ronny Pfannschmidt
4e7486d3fb
fixup: annotations
2022-10-08 08:28:03 +02:00
Ronny Pfannschmidt
d8c783268c
fix #7792 : consider marks from the mro
...
closes #9105 as superseeded
2022-10-08 08:18:26 +02:00
Bruno Oliveira
3c1534944c
Merge pull request #10318 from pytest-dev/pre-commit-ci-update-config
...
[pre-commit.ci] pre-commit autoupdate
2022-10-07 20:04:48 -03:00
Ran Benita
a501518a26
Revert "ci: fix PR not triggering workflows by switching back to pytestbot access token"
2022-10-08 00:58:51 +03:00
Ran Benita
680f3e2097
Merge pull request #10327 from AA-Turner/devnul
...
Use an explicit encoding when opening `os.devnul`
2022-10-08 00:52:11 +03:00
Ran Benita
ed5d4e1269
Merge pull request #10346 from bluetech/ci-pat
...
ci: fix PR not triggering workflows by switching back to pytestbot access token
2022-10-08 00:30:34 +03:00
Tony Narlock
8e7ce60c7d
Export pytest.DoctestItem for typing / runtime purposes ( #10313 )
...
Fixes #10312
2022-10-07 13:03:42 -03:00
wodny
2bc036e50a
Mention pythonpath confval in Good Integration Practices ( #10314 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-07 13:03:13 -03:00
Bruno Oliveira
79c2e92bb8
Merge pull request #10349 from nicoddemus/doc-setup-teardown-nose
2022-10-07 11:48:09 -03:00
Bruno Oliveira
4da0689653
Ignore mypy error about missing generic arg for catch_warnings
...
mypy stubs recently changed warnings.catch_warnings to a Generic, in
order to have proper overloads depending on the parameters passed to it, whihc
triggers this mypy error now when we subclass it:
src/_pytest/recwarn.py:170: error: Missing type parameters for generic type "catch_warnings" [type-arg]
For our porpuses the parameter is not relevant (we always use record=True), so
decided to just ignore the type error.
2022-10-07 11:30:24 -03:00
Florian Bruhin
9be1e3fac8
doc: Add second day for enterPy training ( #10348 )
2022-10-07 16:13:05 +02:00
Bruno Oliveira
0c21d60349
Improve documentation for setup() and teardown() nose support
...
Fix #9549
2022-10-07 11:10:28 -03:00
Bruno Oliveira
4545fcff05
Merge pull request #10335 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-mock-3.9.0
2022-10-07 11:00:10 -03:00
Ronny Pfannschmidt
24ef7c98e8
Merge pull request #10343 from RonnyPfannschmidt/fix-10342-warn-explicit-add-location
...
fix #10342 : put location into warning exceptions
2022-10-07 13:04:32 +02:00
Bruno Oliveira
c4981f5a1b
Merge pull request #10347 from The-Compiler/hookimpl-marker-docs
2022-10-07 07:51:16 -03:00
Ronny Pfannschmidt
7a15bad89b
Update src/_pytest/warning_types.py
...
Co-authored-by: Florian Bruhin <me@the-compiler.org >
2022-10-07 12:46:40 +02:00
Florian Bruhin
72cac9b1af
Mark tryfirst/trylast as deprecated in their docs.
...
Follow-up to #9118
2022-10-07 12:16:53 +02:00
Ran Benita
2df0d9656c
ci: fix PR not triggering workflows by switching back to pytestbot access token
...
The builtin actions token is not allowed to trigger further workflows.
So when we create a PR using that token, the PR checks don't run, and a
maintainer must close & open the PR to make them run. This is quite
annoying, so switch back to the "machine user" approach.
Fixes #9554 .
2022-10-06 21:14:24 +03:00
Bruno Oliveira
4677580cae
Merge pull request #10339 from Moisan/doc_broken_links
2022-10-06 13:05:11 -03:00
Ronny Pfannschmidt
14919c4bbb
fix #10342 : put location into warning exceptions
...
as the warning systems own warn_explicit looses the information
we add them explicitly to the warning exceptions
2022-10-06 11:44:05 +02:00
Thierry Moisan
06007de7ba
Fix a few broken links in the documentation
2022-10-05 10:24:55 -04:00
pre-commit-ci[bot]
4ee6e900a0
[pre-commit.ci] pre-commit autoupdate
...
updates:
- [github.com/PyCQA/autoflake: v1.6.0 → v1.6.1](https://github.com/PyCQA/autoflake/compare/v1.6.0...v1.6.1 )
- [github.com/asottile/reorder_python_imports: v3.8.2 → v3.8.3](https://github.com/asottile/reorder_python_imports/compare/v3.8.2...v3.8.3 )
- [github.com/asottile/pyupgrade: v2.38.0 → v2.38.2](https://github.com/asottile/pyupgrade/compare/v2.38.0...v2.38.2 )
- [github.com/pre-commit/mirrors-mypy: v0.971 → v0.981](https://github.com/pre-commit/mirrors-mypy/compare/v0.971...v0.981 )
2022-10-03 23:32:26 +00:00
dependabot[bot]
eab875509d
build(deps): Bump pytest-mock in /testing/plugins_integration
...
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock ) from 3.8.2 to 3.9.0.
- [Release notes](https://github.com/pytest-dev/pytest-mock/releases )
- [Changelog](https://github.com/pytest-dev/pytest-mock/blob/main/CHANGELOG.rst )
- [Commits](https://github.com/pytest-dev/pytest-mock/compare/v3.8.2...v3.9.0 )
---
updated-dependencies:
- dependency-name: pytest-mock
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-10-03 03:01:46 +00:00
Ronny Pfannschmidt
2be1b8f355
Merge pull request #9118 from RonnyPfannschmidt/fix-4562-deprecate-hookmarkers
...
deprecate hook configuration via marks/attributes
2022-10-02 12:59:16 +02:00
Adam Turner
594413e8f0
Use an explicit encoding when opening os.devnul
...
Although slightly pointless, this avoids an `EncodingWarning` in Python 3.10
or greater when running under the `-X warn_default_encoding` flag.
2022-09-30 23:43:27 +01:00
Ronny Pfannschmidt
ce3e2e922b
bump plugin test pytest cov pin
2022-09-28 22:28:03 +02:00
Bruno Oliveira
59b8ec3ce1
Merge pull request #10308 from pytest-dev/pre-commit-ci-update-config
2022-09-21 16:03:59 -03:00
Ronny Pfannschmidt
ae9dbf5006
add docstring to warn_explicit_for
2022-09-20 16:24:32 +02:00
Ronny Pfannschmidt
7e8a4849d8
unify option extraction for legacy hook marks
2022-09-20 16:24:32 +02:00
Ronny Pfannschmidt
e3294398d6
simplify typing for legacy hook mark support
2022-09-20 16:24:23 +02:00
Ronny Pfannschmidt
b1fb9a9c8d
handle non-true options in hookspec warning
2022-09-20 16:22:26 +02:00
Ronny Pfannschmidt
8c52dc5b7e
remove the setup.py for the py.test project which for deprecation has been deployed since 2014
2022-09-20 16:22:26 +02:00
Ronny Pfannschmidt
0fdacb6db5
deprecate hook configuration via marks/attributes
...
fixes #4562
2022-09-20 16:22:26 +02:00
pre-commit-ci[bot]
256ab097a2
[pre-commit.ci] pre-commit autoupdate
...
updates:
- https://github.com/myint/autoflake → https://github.com/PyCQA/autoflake
- [github.com/PyCQA/autoflake: v1.5.3 → v1.6.0](https://github.com/PyCQA/autoflake/compare/v1.5.3...v1.6.0 )
- [github.com/asottile/pyupgrade: v2.37.3 → v2.38.0](https://github.com/asottile/pyupgrade/compare/v2.37.3...v2.38.0 )
2022-09-19 23:24:54 +00:00
Anthony Sottile
5bd41befa8
Merge pull request #10301 from Zoorken/main
...
doc: Fix 404 'identify flaky test' link (#10244 )
2022-09-16 10:51:08 -04:00
Fredrik Berndtsson
246129089c
doc: Fix 404 'identify flaky test' link ( #10244 )
2022-09-15 23:34:22 +02:00
Florian Bruhin
34765f6b2e
doc: Add link for enterPy training ( #10299 )
2022-09-15 17:07:02 +02:00
Bruno Oliveira
33a083e844
Merge pull request #10291 from pytest-dev/dependabot/pip/testing/plugins_integration/twisted-22.8.0
2022-09-12 09:11:58 -03:00
Bruno Oliveira
77d2c9631a
Merge pull request #10289 from pytest-dev/update-plugin-list/patch-85da6cad1
...
[automated] Update plugin list
2022-09-12 09:08:40 -03:00
dependabot[bot]
d416fbab91
build(deps): Bump twisted in /testing/plugins_integration
...
Bumps [twisted](https://github.com/twisted/twisted ) from 22.4.0 to 22.8.0.
- [Release notes](https://github.com/twisted/twisted/releases )
- [Changelog](https://github.com/twisted/twisted/blob/trunk/NEWS.rst )
- [Commits](https://github.com/twisted/twisted/compare/twisted-22.4.0...twisted-22.8.0 )
---
updated-dependencies:
- dependency-name: twisted
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-09-12 03:01:53 +00:00
pytest bot
f53b49c8c4
[automated] Update plugin list
2022-09-11 00:22:18 +00:00
Bruno Oliveira
85da6cad11
Merge pull request #10285 from skhomuti/allure-pytest-to-plugins
...
Add allure-pytest to the popular plugins list
2022-09-09 09:00:32 -03:00
skhomuti
c326bd5669
Add allure-pytest to the popular plugins list
2022-09-08 22:12:44 +05:00
Bruno Oliveira
a734dab00d
Merge pull request #10279 from The-Compiler/training-update-3
2022-09-07 10:15:02 -03:00
Florian Bruhin
1e0aa16908
Update open trainings
2022-09-07 14:48:49 +02:00
Bruno Oliveira
b34eb0860c
Merge pull request #10275 from pytest-dev/pre-commit-ci-update-config
2022-09-06 08:33:51 -03:00
Bruno Oliveira
77e34526e8
Merge pull request #10225 from nicoddemus/sort-fixtures-docs
2022-09-06 08:33:27 -03:00
Bruno Oliveira
abf4941f3e
Merge pull request #10272 from pytest-dev/dependabot/pip/testing/plugins_integration/django-4.1.1
...
build(deps): Bump django from 4.1 to 4.1.1 in /testing/plugins_integration
2022-09-06 08:33:04 -03:00
pre-commit-ci[bot]
b4ae5e4a35
[pre-commit.ci] pre-commit autoupdate
...
updates:
- [github.com/psf/black: 22.6.0 → 22.8.0](https://github.com/psf/black/compare/22.6.0...22.8.0 )
- [github.com/myint/autoflake: v1.5.1 → v1.5.3](https://github.com/myint/autoflake/compare/v1.5.1...v1.5.3 )
2022-09-05 23:33:43 +00:00
dependabot[bot]
649b2e7f30
build(deps): Bump django in /testing/plugins_integration
...
Bumps [django](https://github.com/django/django ) from 4.1 to 4.1.1.
- [Release notes](https://github.com/django/django/releases )
- [Commits](https://github.com/django/django/commits )
---
updated-dependencies:
- dependency-name: django
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-09-05 13:09:31 +00:00
Bruno Oliveira
6ad32a9c5c
Merge pull request #10268 from pytest-dev/update-plugin-list/patch-4ed2b3a73
...
[automated] Update plugin list
2022-09-04 12:59:41 -03:00
pytest bot
50f390f015
[automated] Update plugin list
2022-09-04 00:23:26 +00:00
Bruno Oliveira
4ed2b3a733
Merge pull request #10267 from nicoddemus/cherry-pick-release
...
Merge pull request #10259 from pytest-dev/release-7.1.3
2022-09-02 08:34:50 -03:00
Bruno Oliveira
7f4b63b143
Merge pull request #10259 from pytest-dev/release-7.1.3
...
Prepare release 7.1.3
(cherry picked from commit 3739e6cd48 )
2022-09-02 08:24:18 -03:00
Philipp A
245a8c23dd
Revamp good practices ( #10206 )
...
* Recommend importlib import mode for new projects
* Recommend src layout more strongly
* Switch to hatchling as the packaging tool in the example (following PyPA)
* Add explanation about the different import modes
2022-09-01 07:55:41 -03:00
Bruno Oliveira
a9bbfb87d6
Merge pull request #10252 from nicoddemus/fix-regendoc
...
Fix regendoc
2022-08-31 14:32:36 -03:00
Bruno Oliveira
1caa099e42
Fix regendoc
...
The finalizers example was wiping out code needed for the examples below.
2022-08-31 14:28:33 -03:00
pre-commit-ci[bot]
4b77638ba8
[pre-commit.ci] pre-commit autoupdate ( #10256 )
...
updates:
- [github.com/myint/autoflake: v1.4 → v1.5.1](https://github.com/myint/autoflake/compare/v1.4...v1.5.1 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-08-30 07:11:58 -03:00
github-actions[bot]
0fc3a977a9
[automated] Update plugin list ( #10253 )
...
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com >
2022-08-29 17:49:38 -03:00
Gergely Kalmár
adaa463ee3
Ignore editable installation modules ( #10231 )
...
Fixes #10230
2022-08-26 09:46:47 -03:00
pre-commit-ci[bot]
42776c0949
[pre-commit.ci] pre-commit autoupdate ( #10178 )
...
* [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/PyCQA/flake8: 4.0.1 → 5.0.4](https://github.com/PyCQA/flake8/compare/4.0.1...5.0.4 )
- [github.com/asottile/pyupgrade: v2.37.2 → v2.37.3](https://github.com/asottile/pyupgrade/compare/v2.37.2...v2.37.3 )
- [github.com/asottile/setup-cfg-fmt: v1.20.2 → v2.0.0](https://github.com/asottile/setup-cfg-fmt/compare/v1.20.2...v2.0.0 )
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Configure setup-cfg-fmt to include version specifiers
* Update .pre-commit-config.yaml
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com >
2022-08-22 20:19:44 -03:00
Bruno Oliveira
059bc2443a
Merge pull request #10234 from pytest-dev/update-plugin-list/patch-d9d890ee1
...
[automated] Update plugin list
2022-08-21 04:44:10 -03:00
pytest bot
932264d8fd
[automated] Update plugin list
2022-08-21 00:21:46 +00:00
Bruno Oliveira
d9d890ee15
Merge pull request #10229 from webknjaz/patch-1
...
Drop `wheel` from `pyproject.toml` example
2022-08-19 14:30:51 -03:00
Sviatoslav Sydorenko
71aa1388e0
Drop wheel from pyproject.toml example
...
It is unnecessary and has been deleted from the setuptools' docs too.
The setuptools' PEP 517 build backend implementation has been
auto-adding the `wheel` dependency since it's first been implemented.
2022-08-19 19:01:40 +02:00
John Litborn
69f2855cc8
fallback to native traceback when handling ExceptionGroup (take 2) [SQUASH] ( #10209 )
...
* Squashed commit of the following:
commit 41d339c46763bbe26123e1e6504b6e32290e33e1
Author: Cheukting <cheukting.ho@gmail.com >
Date: Thu Jun 23 17:01:04 2022 +0800
test in all py versions
commit b3572a5a12672228c3276fc8c8e05980dfb7888a
Author: Cheukting <cheukting.ho@gmail.com >
Date: Thu Jun 23 16:41:06 2022 +0800
add test
commit 7166a2a51e4f99046b028b663c193d8b558c7fd4
Author: Cheukting <cheukting.ho@gmail.com >
Date: Thu Jun 23 16:00:07 2022 +0800
update changelog
commit b958c73d489157f0c0d4e46425083a5e2e2bc851
Author: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Thu Jun 23 07:50:52 2022 +0000
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
commit ea7f376c6ca37c40c83df0e4a1cfaaedb34bae91
Author: Cheukting <cheukting.ho@gmail.com >
Date: Thu Jun 23 15:48:21 2022 +0800
Fix MyPy
commit 97469beb1da40257e9a061a5e19548546c9312c4
Author: Cheukting <cheukting.ho@gmail.com >
Date: Thu Jun 23 15:03:48 2022 +0800
fix if ExceptionGroup not exist
commit 84e553642cd69b4d499231d733df91ebfa84c7ad
Author: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Thu Jun 23 03:43:27 2022 +0000
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
commit 76bbef449b88bbd74fb5cca3b5293337a624ef03
Author: Cheukting <cheukting.ho@gmail.com >
Date: Thu Jun 23 11:40:41 2022 +0800
adding changelog
commit db82bebc5a4969e2083adcd97bdfd2a63bb17d98
Author: Cheukting <cheukting.ho@gmail.com >
Date: Thu Jun 23 11:33:10 2022 +0800
fall back to native when handeling to exception groups
* Typed ExceptionGroupTypes and changed to BaseExceptionGroup, fixed exceptionchain (excinfo->excinfo_, set reprcrash. Extended tests, though they're wip.
* added exceptiongroup to pre-commit-config, moved away from tuple to directly defining BaseExceptionGroup, added block comment, added match line for inner exception, changked mark.skipif to importorskip to not need top-level import, changed tox.ini a bit - only uncovered should now be py37 without exceptiongroup, due to hypothesis
* added py311-exceptiongroup to github CI, exceptiongroup is now a hard dependency on py<3.11, renamed bad variable names
* added use_coverage to ubuntu-py311
* import BaseExceptionGroup with explicit version check instead of try/catch
* removed from CI, added comments to tox and pre-commit
2022-08-17 09:16:32 -07:00
Tatiana Ovary
3039391b83
Update documentation on how pytest.warns affects DeprecationWarning #9291 ( #10141 )
...
Co-authored-by: Dani Sancas <lord.sancas@gmail.com >
On-behalf-of: @clarityai-eng <tech@clarity.ai >
Signed-off-by: Tatiana Ovary <tatiana.ovary@clarity.ai >
2022-08-17 11:44:58 -03:00
Bruno Oliveira
832100955a
Sort fixtures in reference.rst alphabetically
...
While taking a look at the docs I noticed they were not properly sorted.
This just moves the sections around so they are sorted alphabetically, without any other changes.
2022-08-17 11:40:03 -03:00
Ran Benita
bec2b8ee3a
Merge pull request #10220 from bluetech/build-cleanups
...
Two minor cleanups in pyproject.toml and setup.cfg
2022-08-15 20:53:24 +03:00
aizpurua23a
7378f35b03
Update fixtures.rst w/ finalizer order
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com >
2022-08-15 14:00:03 -03:00
Ran Benita
b6eaf319d1
Merge pull request #10219 from bluetech/parametrize-argnames-type
...
mark: allow any Sequence[str] for parametrize(argnames), not just list/tuple
2022-08-15 19:59:45 +03:00
Bruno Oliveira
2e7c718373
Add reference to the Where to patch docs in monkeypatch.setattr ( #10217 )
...
This should help users with the common issue of patching the wrong place.
Also took the opportunity of using proper links in the monkeypatch introduction.
Related to #10216
Co-authored-by: Ran Benita <ran@unusedvar.com >
2022-08-15 13:55:19 -03:00
Ran Benita
08dfd3124c
Merge pull request #10218 from bluetech/sphinx5-changelog
...
changelog: add missing entry for PR #9248 (Sphinx 5)
2022-08-15 19:54:48 +03:00
Ran Benita
56862c03cb
pyproject.toml: remove wheel from build-system.requires
...
It's not required -- see
https://github.com/pypa/packaging.python.org/pull/1050
2022-08-15 19:41:57 +03:00
Ran Benita
67e29d2548
mark: allow any Sequence[str] for parametrize(argnames), not just list/tuple
...
The main motivation for this change is to simplify the type shown in
code editors -- `Sequence[str]` is easier to follow than
`Union[list[str], tuple[str, ...]]`.
It also permits using other types if desired. It might lead to problems
if someone uses some oddball sequence type, but hopefully they won't do
that.
2022-08-15 19:38:09 +03:00
Ran Benita
cb65f64572
changelog: add missing entry for PR #9248
2022-08-15 19:07:36 +03:00
github-actions[bot]
f425dfc158
[automated] Update plugin list ( #10214 )
...
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com >
2022-08-14 05:07:01 -03:00
Ran Benita
63d2f7f7f8
Merge pull request #9248 from bluetech/sphinx4
...
doc: support sphinx 5
2022-08-13 22:35:55 +03:00
Sviatoslav Sydorenko
739322af03
Mention monkeypatch.context() in the docs ( #10192 )
...
In addition:
* Improve the docs a bit with links.
* Recommend `context()` instead of `undo()`.
2022-08-13 16:07:27 -03:00
Ran Benita
beae7fd0ba
doc: workaround for ugly API docs for overloaded functions with new Sphinx
...
New Sphinx added support for overloads and always displays them all with
full type annotations etc. This regresses the API reference for
overloaded functions like `fixture()`, `warns()`, `raises()` and friends
to become impossible to read.
I tried various workarounds but none worked except this one.
2022-08-13 21:46:49 +03:00
Ran Benita
7431750bb6
doc: have tighter control on what autodoc shows
...
New versions of sphinx starting showing `__init__` parameters even when
we don't want them to show because they are private (have `_ispytest`
argument).
The only working solution I found was to switch to
`autodoc_typehints_description_target = "documented"` and explicitly
document parameters for which we want to show the types. It's a little
tedious and repetitive in some simple cases, but overall it results in
nicer API docs.
2022-08-13 21:46:49 +03:00
Ran Benita
cb7f5ed3b1
doc: require sphinx 5
...
Fix #9836 .
2022-08-13 21:45:54 +03:00
Nhieuvu1802
c72d202317
build(deps): Bump pytest-asyncio in /testing/plugins_integration ( #10212 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-12 20:56:51 -03:00
holesch
cc0092b9d8
JUnit XML: Escape error messages in setup/teardown ( #10190 )
...
Co-authored-by: Holesch, Simon (BSH) <simon.holesch@bshg.com >
2022-08-12 11:11:03 +02:00
dependabot[bot]
433efaeaa9
build(deps): Bump django in /testing/plugins_integration ( #10195 )
...
Bumps [django](https://github.com/django/django ) from 4.0.6 to 4.1.
- [Release notes](https://github.com/django/django/releases )
- [Commits](https://github.com/django/django/compare/4.0.6...4.1 )
---
updated-dependencies:
- dependency-name: django
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-12 11:09:06 +02:00
Brandon Chinn
4d430ea6ff
Fix partially unknown type ( #10204 )
2022-08-12 11:08:39 +02:00
github-actions[bot]
abd5df4b3c
[automated] Update plugin list ( #10194 )
...
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com >
2022-08-12 11:06:48 +02:00
Thomas Grainger
58cf20edf0
Update :class:pytest.PytestUnhandledCoroutineWarning to a deprecation; it will raise an error in pytest 8. [SQUASH] ( #10012 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com >
2022-08-08 10:14:49 +01:00
Bruno Oliveira
f43ddd8acd
Merge pull request #10177 from pytest-dev/update-plugin-list/patch-b4ab2f094
...
[automated] Update plugin list
2022-07-31 10:50:44 -03:00
Robert O'Shea
1c31a7e659
Added file-like methods to DontReadFromInput ( #10173 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com >
Fixes #10150
2022-07-31 13:44:02 +00:00
pytest bot
c0e3071fdf
[automated] Update plugin list
2022-07-31 00:22:46 +00:00
Bruno Oliveira
b4ab2f0942
Merge pull request #10170 from pytest-dev/pre-commit-ci-update-config
2022-07-25 20:15:38 -03:00
pre-commit-ci[bot]
dbc1017b08
[pre-commit.ci] pre-commit autoupdate
...
updates:
- [github.com/asottile/reorder_python_imports: v3.8.1 → v3.8.2](https://github.com/asottile/reorder_python_imports/compare/v3.8.1...v3.8.2 )
- [github.com/asottile/pyupgrade: v2.37.1 → v2.37.2](https://github.com/asottile/pyupgrade/compare/v2.37.1...v2.37.2 )
- [github.com/asottile/setup-cfg-fmt: v1.20.1 → v1.20.2](https://github.com/asottile/setup-cfg-fmt/compare/v1.20.1...v1.20.2 )
- [github.com/pre-commit/mirrors-mypy: v0.961 → v0.971](https://github.com/pre-commit/mirrors-mypy/compare/v0.961...v0.971 )
2022-07-25 22:19:32 +00:00
Bruno Oliveira
70659b8c34
Merge pull request #10165 from pytest-dev/update-plugin-list/patch-6c57cc172
...
[automated] Update plugin list
2022-07-23 23:40:51 -03:00
pytest bot
3bf15135e4
[automated] Update plugin list
2022-07-24 00:25:01 +00:00
Bruno Oliveira
6c57cc1727
Merge pull request #10158 from albertvillanova/patch-3
2022-07-23 14:01:38 -03:00
Bruno Oliveira
c0843f94e4
Merge pull request #10157 from albertvillanova/patch-2
...
Fix typo in example/markers documentation
2022-07-23 14:00:29 -03:00
Albert Villanova del Moral
8c5487fd6b
Fix cross-reference in reference/reference docs
2022-07-20 00:01:23 +02:00
Albert Villanova del Moral
4696ba74f9
Fix typo in example/markers docs
2022-07-19 22:16:14 +02:00
Bruno Oliveira
34a285986e
Merge pull request #10143 from sirosen/monkeypatch-ctx-howto
2022-07-15 23:08:21 -03:00
Stephen Rosen
b8e2f42ec1
Add monkeypatch.context() to how-to doc intro
2022-07-15 19:26:36 +00:00
Wolfremium
70cac3d464
Explicit note that tmpdir fixture is discouraged in favour of tmp_path #9937 ( #10138 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com >
Co-authored-by: kevin.hierro-ext <kevin.hierro-ext@clarity.ai >
Co-authored-by: Dani Sancas <lord.sancas@gmail.com >
2022-07-15 08:40:18 -03:00
Nipunn Koorapati
c1d134172c
Add typing for FixtureRequest.param ( #10133 )
...
For now, mark it as Any until #8073 is solved
Fixes #9514
2022-07-14 20:36:05 -03:00
Bruno Oliveira
cbcb3a356e
Merge pull request #10132 from hroncok/python3.11.0b4
2022-07-14 08:37:08 -03:00
Miro Hrončok
09b2c95320
Adjust tests for a last minute Python 3.11 change in the traceback format
...
See https://github.com/python/cpython/issues/93883
and https://github.com/python/cpython/pull/93994
Fixes https://github.com/pytest-dev/pytest/issues/10131
2022-07-13 17:14:37 +02:00
Bruno Oliveira
c2b1d5b368
Merge pull request #10127 from pytest-dev/pre-commit-ci-update-config
2022-07-11 19:56:56 -03:00
pre-commit-ci[bot]
5c513a5fb3
[pre-commit.ci] pre-commit autoupdate
...
updates:
- [github.com/asottile/reorder_python_imports: v3.3.0 → v3.8.1](https://github.com/asottile/reorder_python_imports/compare/v3.3.0...v3.8.1 )
- [github.com/asottile/pyupgrade: v2.34.0 → v2.37.1](https://github.com/asottile/pyupgrade/compare/v2.34.0...v2.37.1 )
2022-07-11 21:57:36 +00:00
Anthony Sottile
7b9f71d84f
Merge pull request #10123 from nicoddemus/fix-mypy-pre-commit
...
Fix mypy pre-commit run
2022-07-11 08:47:45 -04:00
Bruno Oliveira
334d6514c6
Fix mypy pre-commit run
...
This started to fail recently with:
```
mypy.....................................................................Failed
- hook id: mypy
- exit code: 1
src/_pytest/assertion/rewrite.py:284: error: Returning Any from function declared to return "TraversableResources" [no-any-return]
Found 1 error in 1 file (checked 219 source files)
```
Not sure why that started failing, but seems like ignoring that error specifically is OK.
2022-07-11 08:27:09 -03:00
Bruno Oliveira
f6dc71c8de
Merge pull request #10120 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-mock-3.8.2
...
build(deps): Bump pytest-mock from 3.8.1 to 3.8.2 in /testing/plugins_integration
2022-07-11 08:06:23 -03:00
Bruno Oliveira
8c60fa1ef9
Merge pull request #10121 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-sugar-0.9.5
...
build(deps): Bump pytest-sugar from 0.9.4 to 0.9.5 in /testing/plugins_integration
2022-07-11 08:06:09 -03:00
Bruno Oliveira
b83a74a303
Merge pull request #10122 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-bdd-6.0.1
...
build(deps): Bump pytest-bdd from 5.0.0 to 6.0.1 in /testing/plugins_integration
2022-07-11 08:05:48 -03:00
dependabot[bot]
9c5b6fbab2
build(deps): Bump pytest-bdd in /testing/plugins_integration
...
Bumps [pytest-bdd](https://github.com/pytest-dev/pytest-bdd ) from 5.0.0 to 6.0.1.
- [Release notes](https://github.com/pytest-dev/pytest-bdd/releases )
- [Changelog](https://github.com/pytest-dev/pytest-bdd/blob/master/CHANGES.rst )
- [Commits](https://github.com/pytest-dev/pytest-bdd/compare/5.0.0...6.0.1 )
---
updated-dependencies:
- dependency-name: pytest-bdd
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-07-11 03:02:51 +00:00
dependabot[bot]
b1948c60ac
build(deps): Bump pytest-sugar in /testing/plugins_integration
...
Bumps [pytest-sugar](https://github.com/Teemu/pytest-sugar ) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/Teemu/pytest-sugar/releases )
- [Changelog](https://github.com/Teemu/pytest-sugar/blob/master/CHANGES.rst )
- [Commits](https://github.com/Teemu/pytest-sugar/commits )
---
updated-dependencies:
- dependency-name: pytest-sugar
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-07-11 03:02:49 +00:00
dependabot[bot]
da68c9d5bc
build(deps): Bump pytest-mock in /testing/plugins_integration
...
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock ) from 3.8.1 to 3.8.2.
- [Release notes](https://github.com/pytest-dev/pytest-mock/releases )
- [Changelog](https://github.com/pytest-dev/pytest-mock/blob/main/CHANGELOG.rst )
- [Commits](https://github.com/pytest-dev/pytest-mock/compare/v3.8.1...v3.8.2 )
---
updated-dependencies:
- dependency-name: pytest-mock
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-07-11 03:02:47 +00:00
Bruno Oliveira
29041e1e1f
Merge pull request #10118 from pytest-dev/update-plugin-list/patch-7dc540f25
...
[automated] Update plugin list
2022-07-10 07:51:38 -03:00
pytest bot
dda7673f57
[automated] Update plugin list
2022-07-10 00:24:23 +00:00
Anthony Sottile
7dc540f258
Merge pull request #10115 from pytest-dev/atomicwrites-windows
...
replace atomicwrites with os.replace
2022-07-08 22:06:56 -04:00
Anthony Sottile
4cd0322ca1
replace atomicwrites with os.replace
2022-07-08 18:36:10 -07:00
Ronny Pfannschmidt
966d4fb3e4
Merge pull request #10051 from EmptyRabbit/dev_main
...
Fix stage caplog records not clear
2022-07-08 07:46:10 +02:00
Bruno Oliveira
8726597321
Update changelog/9877.bugfix.rst
2022-07-07 09:39:57 -03:00
EmptyRabbit
aa83fa353c
Update changelog/9877.bugfix.rst
...
Co-authored-by: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de >
2022-07-07 19:29:50 +08:00
Florian Bruhin
4449bdc068
Remove europython training ( #10107 )
2022-07-06 13:05:08 +02:00
Bruno Oliveira
929e7d5ae0
Merge pull request #10106 from pytest-dev/dependabot/pip/testing/plugins_integration/django-4.0.6
2022-07-06 07:52:52 -03:00
dependabot[bot]
6d7973942f
build(deps): Bump django in /testing/plugins_integration
...
Bumps [django](https://github.com/django/django ) from 4.0.5 to 4.0.6.
- [Release notes](https://github.com/django/django/releases )
- [Commits](https://github.com/django/django/compare/4.0.5...4.0.6 )
---
updated-dependencies:
- dependency-name: django
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-07-05 22:37:17 +00:00
Bruno Oliveira
4414c4adae
Merge pull request #10102 from pytest-dev/pre-commit-ci-update-config
2022-07-04 20:27:59 -03:00
pre-commit-ci[bot]
b99541e744
[pre-commit.ci] pre-commit autoupdate
...
updates:
- [github.com/psf/black: 22.3.0 → 22.6.0](https://github.com/psf/black/compare/22.3.0...22.6.0 )
- [github.com/asottile/reorder_python_imports: v3.1.0 → v3.3.0](https://github.com/asottile/reorder_python_imports/compare/v3.1.0...v3.3.0 )
2022-07-04 22:38:23 +00:00
Bruno Oliveira
5f57481563
Merge pull request #10099 from pytest-dev/update-plugin-list/patch-b08c1dcf0
...
[automated] Update plugin list
2022-07-03 09:36:57 -03:00
pytest bot
04de180f41
[automated] Update plugin list
2022-07-03 00:22:59 +00:00
Anthony Sottile
b08c1dcf0e
Merge pull request #10093 from pytest-dev/move-changelog-to-bugfix
...
git mv changelog/3396.{improvement,bugfix}.rst
2022-06-30 09:07:24 -04:00
Anthony Sottile
3e590fe79e
git mv changelog/3396.{improvement,bugfix}.rst
2022-06-30 05:47:02 -07:00
Anthony Sottile
7dcabc1f49
Merge pull request #10088 from alicederyn/doctest.importmode
...
Pass importmode to import_path in DoctestModule
2022-06-29 17:57:37 -04:00
Anthony Sottile
2941da0f2b
Merge pull request #10090 from pytest-dev/update-does-not-raise
...
update does_not_raise docs now that pytest is 3.7+ only
2022-06-29 14:00:03 -04:00
Anthony Sottile
1b47de7d7f
update does_not_raise docs now that pytest is 3.7+ only
2022-06-29 13:13:15 -04:00
Alice Purcell
85000f037f
Added Alice Purcell to AUTHORS
2022-06-29 14:39:04 +01:00
Alice Purcell
c34eaaaa1c
Pass importmode to import_path in DoctestModule
...
This allows doctest to be used with namespace modules
2022-06-29 14:38:59 +01:00
Bruno Oliveira
06738e36df
Merge pull request #10081 from nicoddemus/unittest-cls-skip-10060
2022-06-28 12:49:50 -03:00
Anthony Sottile
94bc31b07d
Merge pull request #10086 from pytest-dev/pre-commit-ci-update-config
...
[pre-commit.ci] pre-commit autoupdate
2022-06-28 11:33:04 -04:00
pre-commit-ci[bot]
b961ef5b79
[pre-commit.ci] pre-commit autoupdate
...
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.2.0 → v4.3.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.2.0...v4.3.0 )
- [github.com/asottile/pyupgrade: v2.32.1 → v2.34.0](https://github.com/asottile/pyupgrade/compare/v2.32.1...v2.34.0 )
- [github.com/pre-commit/mirrors-mypy: v0.960 → v0.961](https://github.com/pre-commit/mirrors-mypy/compare/v0.960...v0.961 )
2022-06-27 20:50:23 +00:00
Bruno Oliveira
bd642fac70
Do not call tearDown for skipped unittest.TestCases with --pdb
...
Fix #10060
2022-06-27 10:33:37 -03:00
Bruno Oliveira
da9a2b584e
Merge pull request #10078 from nicoddemus/pathsep-9791
2022-06-27 09:58:38 -03:00
Bruno Oliveira
8bbd35aa69
Merge pull request #10082 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-mock-3.8.1
...
build(deps): Bump pytest-mock from 3.7.0 to 3.8.1 in /testing/plugins_integration
2022-06-27 07:15:41 -03:00
dependabot[bot]
0b1e9ba270
build(deps): Bump pytest-mock in /testing/plugins_integration
...
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock ) from 3.7.0 to 3.8.1.
- [Release notes](https://github.com/pytest-dev/pytest-mock/releases )
- [Changelog](https://github.com/pytest-dev/pytest-mock/blob/main/CHANGELOG.rst )
- [Commits](https://github.com/pytest-dev/pytest-mock/compare/v3.7.0...v3.8.1 )
---
updated-dependencies:
- dependency-name: pytest-mock
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-06-27 03:02:47 +00:00
Bruno Oliveira
f92c4a77ad
Use PurePath directly instead of os.path.sep in rewrite.py
...
Given we are already creating a `PurePath`, just pass the parts directly to it.
This avoids using `os.path.sep`, that although is an official API, seems not to be available in all systems.
Fix #9791
2022-06-26 21:29:05 -03:00
Bruno Oliveira
9a037a5713
Merge pull request #10076 from pytest-dev/update-plugin-list/patch-aafac5578
...
[automated] Update plugin list
2022-06-26 10:54:01 -03:00
Bruno Oliveira
11fb5cd331
Merge pull request #10054 from SnoopJeDi/doc/xfail-multiple-exceptions
...
Indicate support for a tuple of exceptions in xfail raises=
2022-06-26 09:54:18 -03:00
pytest bot
62d975a69e
[automated] Update plugin list
2022-06-26 00:25:07 +00:00
Bruno Oliveira
aafac5578c
Merge pull request #10056 from paulreece/fixture-path-doc-fix
...
Added Docstring description for the Path property of FixtureRequest #9975
2022-06-25 20:55:23 -03:00
Zac Hatfield-Dodds
2b70e7f4df
Merge pull request #10064 from hugovk/test-me-fix-logging.warn-deprecation
...
Replace deprecated logging.warn with logging.warning
2022-06-24 23:29:26 -07:00
Zac Hatfield-Dodds
d2a206683c
Merge pull request #10073 from Kache/main
...
Clarify writing_plugins naming instructions
2022-06-24 23:27:58 -07:00
zx.qiu
f29f79e39f
Use records.clear() in LogCaptureHandler when caplog.clear()
2022-06-24 23:04:04 +08:00
zx.qiu
c7e784f95d
Fix stage caplog records not clear
...
Closes #9877
2022-06-24 23:03:37 +08:00
Kevin C
0a7b8722e5
Clarify writing_plugins naming instructions
...
Fixes : #10072
2022-06-23 18:03:18 -07:00
Bruno Oliveira
aa55975c7d
Doc: Clear mailbox before deleting the user ( #10068 )
2022-06-23 21:47:39 -03:00
Anthony Sottile
141c5e5a89
Merge pull request #10070 from pytest-dev/typos
...
fix some typos to ensure pre-commit.ci fixes main
2022-06-22 11:38:36 -04:00
pre-commit-ci[bot]
cba65e74b3
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2022-06-22 15:32:05 +00:00
Anthony Sottile
74691346bd
fix some typos to ensure pre-commit.ci fixes main
2022-06-22 08:29:02 -07:00
pre-commit-ci[bot]
6db715c205
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2022-06-22 12:16:24 +00:00
Chanvin Xiao
1e6a587363
Doc: Clear mailbox before deleting the user
2022-06-22 20:06:37 +08:00
Hugo van Kemenade
052da7128b
Replace deprecated logging.warn with .warning
2022-06-21 22:53:28 +03:00
Paul Reece
cdc287d21a
Added self to Authors
2022-06-17 12:00:18 -04:00
Paul Reece
5a9536cf42
Added Docstring description for the Path property of the FixtureRequest class.
2022-06-17 11:52:18 -04:00
James Gerity
17c385180d
Indicate support for a tuple of exceptions in xfail raises=
2022-06-16 11:39:41 -04:00
Chris Wheeler
fab696dcd1
Add support for .pytest.ini as an alternative to pytest.ini
...
Closes #9987
2022-06-14 08:24:35 -03:00
Bruno Oliveira
2cd41651bb
Merge pull request #10031 from The-Compiler/trainings
...
Update training list
2022-06-14 07:31:06 -03:00
Bruno Oliveira
5ef064b602
Mark pdb+expect tests as xfail for now ( #10043 )
...
Related to #10042
2022-06-14 07:29:19 -03:00
Bruno Oliveira
d6b837e2d3
Mark pdb+expect tests as xfail for now
...
Related to #10042
2022-06-14 07:01:34 -03:00
Zach OBrien
96412d19ab
Fix representation of tuples in approx
...
Closes #9917
2022-06-14 06:54:32 -03:00
Bruno Oliveira
bb94e83b49
Merge pull request #10035 from pytest-dev/update-plugin-list/patch-04be900d0
...
[automated] Update plugin list
2022-06-13 09:10:40 -03:00
pytest bot
1a50e5222f
[automated] Update plugin list
2022-06-12 00:22:15 +00:00
Florian Bruhin
27c94f573c
Update training list
2022-06-10 15:40:53 +02:00
Bruno Oliveira
04be900d06
Update location of usage.rst to fix manpage compilation ( #10026 )
...
`usage.rst` has been moved from `doc/en` to `doc/en/how-to`, so the `man_pages` configuration
value needs to be updated to the new location, so that we dont get this warning:
writing... WARNING: "man_pages" config value references unknown document usage
2022-06-07 18:49:37 -03:00
Sandro Tosi
fe2c74cb1a
Update location of usage.rst to fix manpage compilation
...
`usage.rst` has been moved from `doc/en` to `doc/en/how-to`, so the `man_pages` configuration
value needs to be updated to the new location, so that we dont get this warning:
writing... WARNING: "man_pages" config value references unknown document usage
2022-06-07 14:43:34 -04:00
dependabot[bot]
083285948f
build(deps): Bump django from 4.0.4 to 4.0.5 in /testing/plugins_integration ( #10021 )
...
Bumps [django](https://github.com/django/django ) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/django/django/releases )
- [Commits](https://github.com/django/django/compare/4.0.4...4.0.5 )
---
updated-dependencies:
- dependency-name: django
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-07 08:01:15 -03:00
github-actions[bot]
433c7376c5
[automated] Update plugin list ( #10020 )
...
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com >
2022-06-05 12:44:38 -03:00
Neil Girdhar
5adfb0e187
Use symbolic NoReturn as a type annotation ( #10018 )
...
Use symbolic NoReturn as a type annotation
2022-06-03 07:59:48 -03:00
Tony Narlock
c2f684fcd6
docs(monkeypatch): Fix autodoc reference links ( #10013 )
...
Close #10014
2022-06-02 10:16:59 -03:00
Bruno Oliveira
130c954bb1
Merge pull request #9904 from johnkangw/notes_update
2022-05-31 16:35:29 -03:00
Hugo van Kemenade
e54c6a1362
Document the --code-highlight default ( #9883 )
...
Also normalized all help text using the patterns:
* `One sentence help text`
* `First sentence of help. Second sentence of help.`
2022-05-31 16:32:51 -03:00
Bruno Oliveira
9a8f5dd73e
Merge pull request #10007 from nicoddemus/importlib-docs
2022-05-31 16:24:55 -03:00
Bruno Oliveira
6017666fe1
Do not advertise that importlib will be default import mode
...
It is clear at this point that changing the default would break a lot of suites, and is not a clear win in all cases anyway.
Close #10003
2022-05-31 09:53:23 -03:00
Anthony Sottile
a72e8b3d3e
Merge pull request #10006 from pytest-dev/pre-commit-ci-update-config
...
[pre-commit.ci] pre-commit autoupdate
2022-05-30 18:31:30 -04:00
pre-commit-ci[bot]
0efd7a6ec6
[pre-commit.ci] pre-commit autoupdate
...
updates:
- [github.com/pre-commit/mirrors-mypy: v0.950 → v0.960](https://github.com/pre-commit/mirrors-mypy/compare/v0.950...v0.960 )
2022-05-30 21:00:26 +00:00
Ronny Pfannschmidt
c533015c56
Merge pull request #9880 from jparise/getfixturemarker-attr
...
Use safe_getattr() in getfixturemarker()
2022-05-30 05:54:40 +02:00
github-actions[bot]
e547cd565d
[automated] Update plugin list ( #10001 )
...
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com >
2022-05-29 13:04:53 -03:00
Zac Hatfield-Dodds
a47e91e077
Merge pull request #9893 from jparise/pytester-mkdir-path
2022-05-27 20:51:50 -07:00
Zac Hatfield-Dodds
420dc7824b
Merge pull request #9990 from petebman/improve_getfixturevalue_error_message
2022-05-27 20:40:55 -07:00
Cheuk Ting Ho
c988e49af6
Warn when test functions return other than None ( #9956 )
...
Closes #7337
2022-05-25 09:48:02 -03:00
github-actions[bot]
31f9e5bcdd
[automated] Update plugin list ( #9985 )
...
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com >
2022-05-24 11:12:31 +02:00
Tim Hoffmann
9a9acf13f8
Declutter doc entry page ( #9969 )
...
- Remove the index page https://docs.pytest.org/en/7.1.x/genindex.html
Such an index is reasonable in books but not so much in HTML pages.
IMHO the integrated search is much more user-friendly and sufficient.
- Remove the PDF link from the entry page. The PDF is already linked
in the sidebar. I anticipate that getting the PDF documentation is
not a major concern for users.
- Remove the sections "Changelog" and "License" from the entry page.
These section only contain links to the respective pages.
These topics are purely technical. They should be easily accessible
(which they still are through sidebar section "About the project"),
but they don't need additional advertisement through a dedicated
section on the entry page.
2022-05-24 10:23:39 +02:00
Jon Parise
8ac6dce2c7
Add shell-style wildcard support to 'testpaths' ( #9897 )
...
This is especially useful for large repositories (e.g. monorepos) that
use a hierarchical file system organization for nested test paths.
src/*/tests
The implementation uses the standard `glob` module to perform wildcard
expansion in Config.parse().
The related logic that determines whether or not to include 'testpaths'
in the terminal header was previously relying on a weak heuristic: if
Config.args matched 'testpaths', then its value was printed. That
generally worked, but it could also print when the user explicitly used
the same arguments on the command-line as listed in 'testpaths'. Not a
big deal, but it shows that the check was logically incorrect.
Now that 'testpaths' can contain wildcards, it's no longer possible to
perform this simple comparison, so this change also introduces a public
Config.ArgSource enum and Config.args_source attribute that explicitly
names the "source" of the arguments: the command line, the invocation
directory, or the 'testdata' configuration value.
2022-05-24 10:20:51 +02:00
Pete Baughman
0e62861e84
Improve error message in getfixturevalue
2022-05-23 17:54:22 +00:00
Bruno Oliveira
611b579d21
Merge pull request #9963 from pytest-dev/dependabot/pip/testing/plugins_integration/anyio-curiotrio--3.6.1
2022-05-17 09:12:45 -03:00
Bruno Oliveira
8469f44401
Merge pull request #9970 from ezio-melotti/fix-tempdirfactory-docstring
...
Fix rst markup in TempdirFactory's docstring.
2022-05-17 08:13:11 -03:00
Bruno Oliveira
a1ed6839e3
Refer to py.path.local instead of LEGACY_PATH constant for better docs
2022-05-17 08:09:21 -03:00
Bruno Oliveira
08c0eb661e
Merge pull request #9968 from timhoffm/doc-reference-order
2022-05-17 07:55:06 -03:00
Bruno Oliveira
1feb857fcc
Merge pull request #9967 from timhoffm/doc-fix-globaltoc
2022-05-17 07:53:53 -03:00
Ezio Melotti
296b642eb3
Fix rst markup in TempdirFactory's docstring.
2022-05-17 07:29:32 +02:00
Tim Hoffmann
ee10ecdf7e
Reorder the reference guides in the docs
...
This changes the order to:
- API Reference
- Fixtures reference
- Configuration
- Exit codes
- Plugin List
which is approximately sorted from general to specific and often used to less used.
Plugin List ist at the end because it points to further external resources.
2022-05-16 23:01:54 +02:00
Tim Hoffmann
73c2d1c6e3
Remove "Python 2.7 and 3.4 Support" from globaltoc
...
Follow up to #9957 - I missed that the globaltoc is hard-coded
and the page needs to be removed there as well.
2022-05-16 22:52:27 +02:00
github-actions[bot]
7b977f4beb
[automated] Update plugin list ( #9959 )
...
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com >
2022-05-16 08:46:51 -03:00
Tim Hoffmann
5d28a58640
Remove docs on Python 2.7 and 3.4 Support ( #9957 )
...
This extensive explanation is not need anymore because they are now
unsupported for a long time.
Instead add as short section on Python version compatibility in the
backward compatibility docs.
2022-05-16 10:17:18 +02:00
dependabot[bot]
5d20e28538
build(deps): Bump anyio[curio,trio] in /testing/plugins_integration
...
Bumps [anyio[curio,trio]](https://github.com/agronholm/anyio ) from 3.5.0 to 3.6.1.
- [Release notes](https://github.com/agronholm/anyio/releases )
- [Changelog](https://github.com/agronholm/anyio/blob/master/docs/versionhistory.rst )
- [Commits](https://github.com/agronholm/anyio/compare/3.5.0...3.6.1 )
---
updated-dependencies:
- dependency-name: anyio[curio,trio]
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-05-16 03:02:09 +00:00
Bruno Oliveira
cc0fbbefa0
Add CHANGELOG for #9873 ( #9953 )
2022-05-14 12:50:40 +02:00
sommersoft
56c266640e
Do not truncate crash messages in short test summary on CI ( #9933 )
...
Closes #9920
2022-05-13 08:15:52 -03:00
Bruno Oliveira
69fb79e741
Add colors to summary ( #9875 )
...
Fix #9873
2022-05-12 09:55:40 -03:00
Bruno Oliveira
90d2adf0e8
Merge pull request #9951 from rcomer/document-subtest
2022-05-12 09:35:39 -03:00
Ruth Comer
c5432a18e7
doc: link to pytest-subtests
2022-05-12 12:20:00 +01:00
pre-commit-ci[bot]
16781f9b8c
[pre-commit.ci] pre-commit autoupdate ( #9936 )
...
[pre-commit.ci] pre-commit autoupdate
2022-05-11 10:52:41 -03:00
Pax
a88c0f3bb0
Add link to python docs on logging levels ( #9925 )
2022-05-11 11:02:36 +03:00
Zac Hatfield-Dodds
ccdee08ddd
Merge pull request #9911 from bkeyvani/fix-issue-8646
2022-05-10 23:53:40 -07:00
Zac Hatfield-Dodds
a29f4aff98
Update 8646.improvement.rst
2022-05-10 23:27:33 -07:00
Zac Hatfield-Dodds
58af76122f
Move changelog file
2022-05-10 23:27:06 -07:00
Zac Hatfield-Dodds
29462b1277
type-ignore in error-message test
2022-05-10 23:24:13 -07:00
Bruno Oliveira
37316ed0de
Merge pull request #9940 from timhoffm/doc-reference-cleanup
2022-05-10 17:21:32 -03:00
Tim Hoffmann
231e220635
Move documentation contents from reference.rst to docstrings
...
It's better to have the documentation in one place, instead
of having some in the docstring and some additional
information added to the reference documentation in
`reference.rst`.
2022-05-10 20:04:25 +02:00
Bruno Oliveira
93fdb3ecb7
Consistently add **Tutorial**: in front of how-to links in reference ( #9938 )
...
Up to now, some had the prefix, some didn't. I think it's good to have
this prefix to give more context, otherwise the links sometimes blend
into the description.
In one case, the link goes to an example, so I used `**Example**:` there.
2022-05-10 11:37:33 -03:00
Tim Hoffmann
a4a8763ebf
Consistently add **Tutorial**: in front of how-to links in reference
...
Up to now, some had the prefix, some didn't. I think it's good to have
this prefix to give more context, otherwise the links sometimes blend
into the description.
In one case, the link goes to an example, so I used `**Example**:` there.
2022-05-10 16:27:21 +02:00
Babak Keyvani
31a9c5c667
improve pytest.raises - cont'd
...
a few more iterations on error message and related tests.
2022-05-09 21:15:02 -04:00
Ran Benita
db139307ce
Merge pull request #9931 from bluetech/py11-rglob
...
testing: fix Path.rglob("") failures in Python 3.11b1
2022-05-09 16:15:36 +03:00
Ran Benita
644a81af37
testing: fix Path.rglob("") failures in Python 3.11b1
...
Fix #9930 .
2022-05-09 12:52:57 +03:00
Ran Benita
f6aa9d661d
Merge pull request #9926 from pytest-dev/update-plugin-list/patch-5f9d68c8d
...
[automated] Update plugin list
2022-05-09 11:33:32 +03:00
Ran Benita
933156b296
Merge pull request #9915 from peymanslh/fix-encoding-warning
...
Fix default encoding in cacheprovider
2022-05-09 11:33:05 +03:00
pytest bot
23c8f3d234
[automated] Update plugin list
2022-05-08 00:18:36 +00:00
MatthewFlamm
5f9d68c8d9
Clarify precision when using NUMBER option in --doctest-modules ( #9914 )
...
Fix #9892
2022-05-06 20:25:44 -03:00
Peyman Salehi
2f62e6ec96
Fix default encoding in cacheprovider
2022-05-03 20:56:46 +04:30
Anthony Sottile
4ddf48b0a3
Merge pull request #9912 from pytest-dev/pre-commit-ci-update-config
...
[pre-commit.ci] pre-commit autoupdate
2022-05-03 11:17:47 -04:00
pre-commit-ci[bot]
f25b9f619b
[pre-commit.ci] pre-commit autoupdate
...
updates:
- [github.com/asottile/reorder_python_imports: v3.0.1 → v3.1.0](https://github.com/asottile/reorder_python_imports/compare/v3.0.1...v3.1.0 )
- [github.com/pre-commit/mirrors-mypy: v0.942 → v0.950](https://github.com/pre-commit/mirrors-mypy/compare/v0.942...v0.950 )
2022-05-02 20:47:02 +00:00
Ran Benita
33bf91482e
Merge pull request #9905 from pytest-dev/update-plugin-list/patch-e580534df
...
[automated] Update plugin list
2022-05-02 22:41:00 +03:00
Shantanu
2ba8fd5bc5
Re-export importlib.metadata from _pytest.compat ( #9906 )
...
I'm fixing a bug in mypy's --no-implicit-reexport logic in
https://github.com/python/mypy/pull/12704 and mypy-primer flagged this
2022-05-01 10:05:41 +03:00
pytest bot
306b33e755
[automated] Update plugin list
2022-05-01 00:24:20 +00:00
Babak Keyvani
3444d35c54
improve pytest.raises
2022-04-30 17:56:36 -06:00
johnkangw
97383d2d5d
Mention use of re_assert for strings in approx docs
2022-04-30 17:20:31 -06:00
Florian Bruhin
e580534df0
doc: Reformat/Modernize some code ( #9900 )
...
Found because I was curious what https://pypi.org/project/shed/ does with pytest.
2022-04-28 16:30:16 +02:00
Jon Parise
f6db7ae749
Let mkdir() and mkpydir() receive PathLike names
...
These pytester utility methods were annotated to only receive `str`
names, but they naturally support os.PathLike values, as well.
This makes writing some pytester calls a little nicer, such as when
creating a directory based on a `.joinpath()` call. We previously needed
to cast that intermediate value to a `str`.
2022-04-25 17:21:15 -07:00
Bruno Oliveira
eb8b3ad929
Merge pull request #9885 from pytest-dev/update-plugin-list/patch-d949b3f7d
...
[automated] Update plugin list
2022-04-23 21:49:20 -03:00
pytest bot
21091a45d0
[automated] Update plugin list
2022-04-24 00:19:03 +00:00
Bruno Oliveira
d949b3f7d9
Merge pull request #9882 from nicoddemus/check-pick-release
...
Cherry-pick: 7.1.2 (#9881 )
2022-04-23 11:51:08 -03:00
Bruno Oliveira
246815de13
Prepare release version 7.1.2 ( #9881 )
...
Co-authored-by: pytest bot <pytestbot@gmail.com >
(cherry picked from commit df9df55749 )
2022-04-23 11:38:26 -03:00
Jon Parise
e598429c73
Use safe_getattr() in getfixturemarker()
2022-04-22 14:47:36 -07:00
Zac Hatfield-Dodds
0347957aa7
Fix wrong log_file docs ( #9878 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com >
2022-04-22 15:15:27 -03:00
Bruno Oliveira
1e8e46d456
Merge pull request #9823 from tobiasdiez/patch-1
...
Clarify error message in case no collectors are found for a file
2022-04-22 07:28:08 -03:00
Tobias Diez
7df405747a
Merge branch 'pytest-dev:main' into patch-1
2022-04-22 12:11:03 +02:00
Zac Hatfield-Dodds
28e8c8582e
Merge pull request #9871 from paulmueller/getpass-import-error
...
fix: move 'import getpass' statement to try-clause
2022-04-20 15:48:57 -07:00
Paul Müller
1285caadf2
Update 9871.bugfix.rst
2022-04-21 00:18:47 +02:00
pre-commit-ci[bot]
12971a37e1
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2022-04-20 18:23:04 +00:00
Paul Müller
715d0ca9d0
cleanup
2022-04-20 20:21:44 +02:00
Paul Müller
2b9f8f2f9b
Create 9871.bugfix.rst
2022-04-20 20:20:53 +02:00
pre-commit-ci[bot]
ac9b65d890
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2022-04-20 18:15:49 +00:00
Paul Müller
8514fab409
Update AUTHORS
2022-04-20 20:15:29 +02:00
Paul Müller
988197c795
fix: move 'import getpass' statement to try-clause
2022-04-20 20:09:37 +02:00
dependabot[bot]
1ea7081752
build(deps): Bump pytest-asyncio in /testing/plugins_integration ( #9824 )
...
Bumps [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio ) from 0.18.2 to 0.18.3.
- [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases )
- [Changelog](https://github.com/pytest-dev/pytest-asyncio/blob/master/CHANGELOG.rst )
- [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v0.18.2...v0.18.3 )
---
updated-dependencies:
- dependency-name: pytest-asyncio
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-20 13:08:56 -03:00
github-actions[bot]
6a3168e770
[automated] Update plugin list ( #9864 )
...
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com >
2022-04-20 13:08:36 -03:00
Hugo van Kemenade
5800d39053
Increase stacklevel to point at user's code ( #9869 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-04-20 13:07:10 -03:00
Bruno Oliveira
045dbc895d
Merge pull request #9866 from pytest-dev/dependabot/pip/testing/plugins_integration/twisted-22.4.0
...
build(deps): Bump twisted from 22.2.0 to 22.4.0 in /testing/plugins_integration
2022-04-19 09:38:10 -03:00
Bruno Oliveira
a60a6a3fea
Merge pull request #9865 from pytest-dev/dependabot/pip/testing/plugins_integration/django-4.0.4
2022-04-19 09:37:40 -03:00
Anthony Sottile
4e3ec26487
Merge pull request #9863 from gresm/patch-1
...
Update goodpractices.rst
2022-04-18 11:35:44 -04:00
dependabot[bot]
86b62067b7
build(deps): Bump twisted in /testing/plugins_integration
...
Bumps [twisted](https://github.com/twisted/twisted ) from 22.2.0 to 22.4.0.
- [Release notes](https://github.com/twisted/twisted/releases )
- [Changelog](https://github.com/twisted/twisted/blob/trunk/NEWS.rst )
- [Commits](https://github.com/twisted/twisted/compare/twisted-22.2.0...twisted-22.4.0 )
---
updated-dependencies:
- dependency-name: twisted
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-04-18 03:01:59 +00:00
dependabot[bot]
ace71037ab
build(deps): Bump django in /testing/plugins_integration
...
Bumps [django](https://github.com/django/django ) from 4.0.3 to 4.0.4.
- [Release notes](https://github.com/django/django/releases )
- [Commits](https://github.com/django/django/compare/4.0.3...4.0.4 )
---
updated-dependencies:
- dependency-name: django
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-04-18 03:01:56 +00:00
Shantanu
2e8a319828
Use tomllib on Python 3.11 ( #9741 )
2022-04-17 21:11:17 +03:00
gresm
61095e4ba6
Update goodpractices.rst
...
Fix example package tree.
2022-04-16 15:51:21 +02:00
Bruno Oliveira
752a059cc2
Merge pull request #9854 from pytest-dev/docs-contributing-easy
2022-04-12 13:40:42 -03:00
Hugo van Kemenade
99e20713fd
Docs: link to easy issues in contributing guide
2022-04-12 17:26:30 +03:00
Bruno Oliveira
26c62e1793
Merge pull request #9852 from pytest-dev/pre-commit-ci-update-config
...
[pre-commit.ci] pre-commit autoupdate
2022-04-12 08:03:44 -03:00
pre-commit-ci[bot]
61dfdfcc3f
[pre-commit.ci] pre-commit autoupdate
...
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.1.0 → v4.2.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.1.0...v4.2.0 )
- [github.com/asottile/pyupgrade: v2.31.1 → v2.32.0](https://github.com/asottile/pyupgrade/compare/v2.31.1...v2.32.0 )
2022-04-11 21:28:05 +00:00
Bruno Oliveira
9c2ee32069
Merge pull request #9849 from pytest-dev/update-plugin-list/patch-f0cf63a84
...
[automated] Update plugin list
2022-04-10 11:20:50 -03:00
pytest bot
765583dc34
[automated] Update plugin list
2022-04-10 00:17:14 +00:00
Anthony Sottile
f0cf63a84a
Merge pull request #9842 from asottile/init-var-only-dataclasses
...
fix comparison of dataclasses with `InitVar`
2022-04-08 20:08:51 -04:00
Anthony Sottile
8fa775bcee
fix comparison of dataclasses with InitVar
2022-04-08 19:51:05 -04:00
Bruno Oliveira
539a5d70f2
Merge pull request #9843 from asottile/sphinx-workaround
2022-04-08 20:33:40 -03:00
Anthony Sottile
1527130476
temporarily pin jinja2 version for docs build
2022-04-08 17:08:30 -04:00
Bruno Oliveira
238b25ffa9
Merge pull request #9826 from pytest-dev/pre-commit-ci-update-config
...
[pre-commit.ci] pre-commit autoupdate
2022-04-05 09:07:39 -03:00
pre-commit-ci[bot]
e2269f8a5c
[pre-commit.ci] pre-commit autoupdate
...
updates:
- [github.com/psf/black: 22.1.0 → 22.3.0](https://github.com/psf/black/compare/22.1.0...22.3.0 )
- [github.com/asottile/setup-cfg-fmt: v1.20.0 → v1.20.1](https://github.com/asottile/setup-cfg-fmt/compare/v1.20.0...v1.20.1 )
- [github.com/pre-commit/mirrors-mypy: v0.941 → v0.942](https://github.com/pre-commit/mirrors-mypy/compare/v0.941...v0.942 )
2022-04-04 20:26:44 +00:00
Bruno Oliveira
16345bf689
Merge pull request #9832 from pytest-dev/update-plugin-list/patch-00ad12b9d
...
[automated] Update plugin list
2022-04-03 12:53:34 -03:00
pytest bot
79725c9102
[automated] Update plugin list
2022-04-03 00:17:36 +00:00
Tobias Diez
387ec02021
Add to AUTHORS
2022-03-29 12:38:34 +02:00
Tobias Diez
3fcdbaf0c5
Add changelog
2022-03-29 12:37:23 +02:00
Tobias Diez
141b301d3d
Fix more tests
2022-03-29 12:34:15 +02:00
Tobias Diez
31595e8733
Fix tests
2022-03-29 12:33:13 +02:00
Tobias Diez
63c7338028
Fix rename issue
2022-03-27 16:56:23 +02:00
pre-commit-ci[bot]
0eae340e13
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2022-03-27 14:41:12 +00:00
Tobias Diez
1f10c59cd3
Clarify error message in case no collectors are found for a file
2022-03-27 16:30:57 +02:00
Bruno Oliveira
00ad12b9db
Merge pull request #9821 from pytest-dev/update-plugin-list/patch-176d2d7b4
...
[automated] Update plugin list
2022-03-27 08:20:10 -03:00
pytest bot
592fee2263
[automated] Update plugin list
2022-03-27 00:19:03 +00:00
Anthony Sottile
176d2d7b4e
Merge pull request #9806 from pytest-dev/pre-commit-ci-update-config
...
[pre-commit.ci] pre-commit autoupdate
2022-03-23 21:00:02 -04:00
Ran Benita
05dcb22365
Merge pull request #9727 from pytest-dev/dependabot/pip/testing/plugins_integration/twisted-22.2.0
...
build(deps): Bump twisted from 22.1.0 to 22.2.0 in /testing/plugins_integration
2022-03-22 10:21:10 +02:00
dependabot[bot]
cccb9d8530
build(deps): Bump twisted in /testing/plugins_integration
...
Bumps [twisted](https://github.com/twisted/twisted ) from 22.1.0 to 22.2.0.
- [Release notes](https://github.com/twisted/twisted/releases )
- [Changelog](https://github.com/twisted/twisted/blob/twisted-22.2.0/NEWS.rst )
- [Commits](https://github.com/twisted/twisted/compare/twisted-22.1.0...twisted-22.2.0 )
---
updated-dependencies:
- dependency-name: twisted
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-03-22 08:00:11 +00:00
pre-commit-ci[bot]
67ab712480
[pre-commit.ci] pre-commit autoupdate
...
updates:
- [github.com/pre-commit/mirrors-mypy: v0.940 → v0.941](https://github.com/pre-commit/mirrors-mypy/compare/v0.940...v0.941 )
2022-03-21 23:41:24 +00:00
Bruno Oliveira
250a0344ad
Merge pull request #9804 from nicoddemus/311-cwd-tests
2022-03-21 13:11:51 -03:00
Bruno Oliveira
3c359455e2
Change directories during some tests in test_collection.py
...
As discussed in https://github.com/pytest-dev/pytest/pull/9800 , this uses
monkeypatch to change directories for two tests in `test_collection.py`, to preserve
their original purpose (even if just removing it doesn't seem to affect the outcome).
2022-03-21 12:38:20 -03:00
Bruno Oliveira
d5ce9f5a16
Merge pull request #9800 from Zac-HD/fix-311-ci
2022-03-21 08:18:39 -03:00
Zac Hatfield-Dodds
0ebfa1d76d
Fix CI for Python 3.11
...
Getting the current working directory has no side-effects, so these context managers were no-ops.
Discovered because Path.__enter__ is deprecated in Python 3.11, for removal in 3.13.
2022-03-20 21:01:26 -07:00
Ronny Pfannschmidt
e9dd3dffab
Enhance errors for exception/warnings matching ( #8508 )
...
Co-authored-by: Florian Bruhin <me@the-compiler.org >
2022-03-20 23:32:39 -03:00
Kian Eliasi
3297bb24a9
Remove unnecessary numpy import ( #9798 )
...
Fix #9726
2022-03-21 00:01:59 +00:00
Bruno Oliveira
6a6a32ceca
Merge pull request #9796 from pytest-dev/update-plugin-list/patch-4b6b91fda
...
[automated] Update plugin list
2022-03-20 10:55:32 -03:00
pytest bot
e503faeb6e
[automated] Update plugin list
2022-03-20 00:17:32 +00:00
Bruno Oliveira
4b6b91fda3
Merge pull request #9794 from nicoddemus/split-workflows
2022-03-19 09:34:45 -03:00
Bruno Oliveira
4c16b5af03
Split test/deploy workflows
...
This will trigger a deploy directly when a tag is pushed, avoiding
having to wait for another lenghty build.
This is safe since we only push release tags after the release PR has passed all its tests.
See comments in #9793 .
2022-03-19 09:04:41 -03:00
Samuel Colvin
b75cbee290
Remove newlines from left/right operands with '-vv' ( #9743 )
...
The left/right operands produced when `verbose > 1` should not contain newlines, because they are used to
build the `summary` string. The `assertrepr_compare` function returns a list of lines, and the summary is one of those lines and should not contain newlines itself.
Fix #9742
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com >
2022-03-19 11:55:39 +00:00
Ran Benita
eb22339dc3
Merge pull request #9786 from bluetech/cherry-pick-release
...
Merge pull request #9785 from pytest-dev/release-7.1.1
2022-03-19 13:44:10 +02:00
Bruno Oliveira
63126643b9
Merge pull request #9789 from spaceone/fix-typo
2022-03-18 18:57:52 -03:00
Florian Best
8f64a39d0a
[style]: fix typo in docstring
2022-03-18 22:00:14 +01:00
Ran Benita
a18655f729
Merge pull request #9785 from pytest-dev/release-7.1.1
...
Prepare release 7.1.1
(cherry picked from commit b9462ed7d0 )
2022-03-17 23:18:11 +02:00
Ran Benita
22756c28e5
Merge pull request #9768 from bluetech/fix-tests-verbose
...
testing: fix tests when run under `-v` or `-vv`
2022-03-17 18:17:17 +02:00
Ran Benita
f196701cc1
Merge pull request #9780 from bluetech/restore-confcutdir-behavior
...
config: restore pre-pytest 7.1.0 confcutdir exclusion behavior
2022-03-17 18:13:06 +02:00
Ran Benita
1d70b022f0
config: restore pre-pytest 7.1.0 confcutdir exclusion behavior
...
The change from `path not in confuctdir.parents` to the `relative_to`
check in 0c98f19231 broke picking up
conftest files when running against an installed package/site-packages.
See the issue for more details.
Fix #9767 .
2022-03-16 22:55:06 +02:00
pre-commit-ci[bot]
d52a6e6074
[pre-commit.ci] pre-commit autoupdate ( #9769 )
...
* [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/reorder_python_imports: v2.7.1 → v3.0.1](https://github.com/asottile/reorder_python_imports/compare/v2.7.1...v3.0.1 )
- [github.com/asottile/pyupgrade: v2.31.0 → v2.31.1](https://github.com/asottile/pyupgrade/compare/v2.31.0...v2.31.1 )
- [github.com/pre-commit/mirrors-mypy: v0.931 → v0.940](https://github.com/pre-commit/mirrors-mypy/compare/v0.931...v0.940 )
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix mypy errors
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com >
2022-03-16 21:34:40 +02:00
Ran Benita
2bec21ef5f
Merge pull request #9756 from ajberdy/main
...
Fixed typo in pytester docs.
2022-03-16 21:32:42 +02:00
Ran Benita
5c1756343f
Merge pull request #9757 from pytest-dev/update-plugin-list/patch-d306ec0a7
...
[automated] Update plugin list
2022-03-16 21:32:11 +02:00
Ran Benita
a854ab97b9
Merge pull request #9766 from Rowin/pytest-warns-typo
...
Typo correction
2022-03-16 21:31:39 +02:00
pre-commit-ci[bot]
abfae83130
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2022-03-14 20:48:34 +00:00
Ran Benita
37fa0fb4d3
testing: fix tests when run under -v or -vv
...
Regressed in fac8f284cd , didn't notice
since we don't run tests in CI with `-v`.
2022-03-14 22:27:52 +02:00
Rowin
e75cdae2bc
Typo correction
...
A word was missing in the docstring of the warns function.
2022-03-14 13:26:17 +01:00
Ran Benita
f0bf4c9681
Merge pull request #9760 from bluetech/cherry-pick-release
...
Merge pull request #9758 from pytest-dev/release-7.1.0
2022-03-13 17:20:13 +02:00
Ran Benita
d87e1e67dd
Merge pull request #9758 from pytest-dev/release-7.1.0
...
Prepare release 7.1.0
(cherry picked from commit 7d4d1ecde6 )
2022-03-13 16:59:20 +02:00
pytest bot
61f2b265a3
[automated] Update plugin list
2022-03-13 00:15:56 +00:00
Aaron Berdy
f3053017b9
fix typo in pytester docs
2022-03-12 14:44:52 -08:00
Florian Bruhin
d306ec0a7e
Update upcoming trainings ( #9744 )
...
* Update upcoming trainings
* Remove old-ish link
* Revert "Remove old-ish link"
This reverts commit 30d75f5088 .
* Use crossref
* Add past training
2022-03-12 16:51:56 +01:00
Bruno Oliveira
3e4c14bfaa
Merge pull request #9751 from fabianegli/main
2022-03-11 09:53:30 -03:00
Fabian Egli
7f924b13a5
Fix typo in deprecation documentation
2022-03-11 11:15:28 +01:00
dependabot[bot]
4a8f8ada43
build(deps): Bump django from 4.0.2 to 4.0.3 in /testing/plugins_integration ( #9737 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-07 13:50:25 +00:00
dependabot[bot]
c0fd2d8839
build(deps): Bump pytest-asyncio from 0.18.1 to 0.18.2 in /testing/plugins_integration ( #9736 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-07 10:29:39 -03:00
Anthony Sottile
843e01824c
Merge pull request #9732 from nicoddemus/9730-toml-failure
...
Improve error message for malformed pyproject.toml files
2022-03-06 10:01:13 -05:00
github-actions[bot]
bc43d66b47
[automated] Update plugin list ( #9733 )
...
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com >
2022-03-06 00:01:38 -03:00
Bruno Oliveira
e38d1cac48
Improve error message for malformed pyproject.toml files
...
Including the file name is enough to let the user know what the problem is.
The same is not needed for `.ini` files because the error message includes the path to the file by default.
Fix #9730
2022-03-05 08:59:28 -03:00
github-actions[bot]
cf0a4f79b0
[automated] Update plugin list ( #9717 )
...
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com >
2022-03-04 12:56:11 -03:00
Anthony Sottile
51b86b4dc4
Merge pull request #9714 from nicoddemus/pytester-request-monkeypatch-9708
...
pytester now requests monkeypatch instead of creating its own instance
2022-03-04 09:22:56 -05:00
Bruno Oliveira
f943d1944a
pytester now requests monkeypatch instead of creating its own instance
...
It is tempting to use `monkeypatch` to replace the other mechanisms in pytester which change global
state: `CwdSnapshot`, `SysModulesSnapshot`, `SysPathsSnapshot`, however those are more delicate
than they look at first glance so leaving those alone for now.
Close #9708
2022-03-04 08:58:44 -05:00
Anthony Sottile
9318b2cb7f
Merge pull request #9719 from asottile/fix-setuptools-pollution
...
prevent import-time side-effects from setuptools bundled importlib-metadata
2022-03-03 09:01:41 -05:00
Anthony Sottile
269611e0b4
prevent import-time side-effects from setuptools bundled importlib-metadata
2022-02-28 19:35:36 -05:00
Kojo Idrissa
e466a87bb0
Add the latest book edition of 'Python Testing with pytest'
2022-02-25 19:13:23 -03:00
Bruno Oliveira
5f3d94c47e
Disallow unordered sequences in pytest.approx ( #9709 )
...
Fix #9692
2022-02-24 10:16:35 -03:00
Bruno Oliveira
bcc826d0fb
Fix numbering and improve changelog entry for #9362 ( #9713 )
2022-02-23 19:03:13 -03:00
Ran Benita
4778e999a5
Merge pull request #9702 from m-tmatma/feature/fix-bash-complete
...
fix link of argcomplete page.
2022-02-23 19:30:40 +02:00
Ran Benita
7b6e477e2f
Revert "Deprecate raising unittest.SkipTest to skip tests during collection" ( #9710 )
...
This reverts commit 25e657bfc1 .
Turns out that this *is* a working unittest feature, which pytest should
support, so undo the deprecation.
2022-02-23 15:59:54 +02:00
github-actions[bot]
0c80a1c836
[automated] Update plugin list ( #9701 )
...
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com >
2022-02-23 08:26:18 -03:00
Masaru Tsuchiyama
7f50c521b6
fix link of argcomplete page.
2022-02-20 17:29:12 +09:00
Bruno Oliveira
9af3e23695
Expand warnings output for ResourceWarning ( #9682 )
...
Fix #9644
2022-02-15 13:00:50 +00:00
Ran Benita
bdbad91493
Merge pull request #9546 from bluetech/fixturedef-attr-doc
...
fixtures: document FixtureDef's attributes
2022-02-15 14:52:50 +02:00
Bruno Oliveira
fac8f284cd
Fix diff output for data types where -v would show less information ( #9661 )
...
Close #5192
2022-02-15 09:43:20 -03:00
Ran Benita
afe41e5273
Merge pull request #9678 from bluetech/consistent-idval
...
python: unify code to generate ID from value
2022-02-15 13:23:35 +02:00
eduardo naufel schettino
c9cf2d4424
Fix count of selected tests on terminal collection summary ( #9628 )
2022-02-15 11:17:34 +00:00
Bruno Oliveira
f22451717d
Merge pull request #9681 from nicoddemus/fix-9645-import-lib
2022-02-14 12:00:29 -03:00
Bruno Oliveira
04cf8db1d7
Merge pull request #9679 from pytest-dev/update-plugin-list/patch-c01a5c177
...
[automated] Update plugin list
2022-02-14 09:43:59 -03:00
Bruno Oliveira
747b8372ea
Try to import module before creating dummy modules with 'importmode=importlib'
...
The dummy modules we introduce in `insert_missing_modules` (due to #7856 and #7859 )
would cause problems if the dummy modules actually end up replacing modules
which could be imported normally because they are available in `PYTHONPATH`.
Now we attempt to first import the module via normal mechanisms, and only
introduce the dummy modules if the intermediary modules don't actually exist.
Close #9645
2022-02-14 09:42:05 -03:00
Andrew Svetlov
fc72ffa39e
Merge pull request #9683 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-asyncio-0.18.1
...
build(deps): Bump pytest-asyncio from 0.17.2 to 0.18.1 in /testing/plugins_integration
2022-02-14 09:10:41 +02:00
dependabot[bot]
3e53307586
build(deps): Bump pytest-asyncio in /testing/plugins_integration
...
Bumps [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio ) from 0.17.2 to 0.18.1.
- [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases )
- [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v0.17.2...v0.18.1 )
---
updated-dependencies:
- dependency-name: pytest-asyncio
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-02-14 03:02:17 +00:00
pytest bot
295e7535c9
[automated] Update plugin list
2022-02-13 00:15:13 +00:00
Ran Benita
c3aa4647c7
python: unify code to generate ID from value
...
In the following
@pytest.mark.parametrize(..., ids=[val])
the ID values are only allowed to be `str`, `float`, `int` or `bool`.
In the following
@pytest.mark.parametrize(..., [val])
@pytest.mark.parametrize(..., [pytest.param(..., id=val])
a different code path is used, which also allows `bytes`, `complex`,
`re.Pattern`, `Enum` and anything with a `__name__`.
In the interest of consistency, use the latter code path for all cases.
2022-02-12 19:22:37 +02:00
Bruno Oliveira
c01a5c177b
Merge pull request #9676 from nicoddemus/cherry-pick-release
2022-02-11 16:09:42 -03:00
Bruno Oliveira
68be319165
Merge pull request #9674 from pytest-dev/release-7.0.1
...
(cherry picked from commit 18d35b817d )
2022-02-11 15:52:00 -03:00
Bruno Oliveira
8afec9a64d
Add autoflake to pre-commit configuration ( #9666 )
2022-02-11 14:34:02 -03:00
Bruno Oliveira
b79eff065e
Enable testing with Python 3.11 ( #9511 )
2022-02-11 15:20:42 +00:00
Bruno Oliveira
6828ec2f9b
Merge pull request #9669 from hugovk/ci-only-update-plugin-list-for-upstream
2022-02-11 09:24:09 -03:00
Bruno Oliveira
2a5bb3b4e0
Merge pull request #9668 from hugovk/test-me-latest-3.10
2022-02-11 09:15:14 -03:00
Hugo van Kemenade
eb8a3ef849
Only update the plugin for upstream
2022-02-11 14:03:22 +02:00
Hugo van Kemenade
be0c41bf8e
CI: Test latest 3.10 available
2022-02-11 13:49:11 +02:00
Bruno Oliveira
9e922c4325
Merge pull request #9662 from pytest-dev/dependabot/pip/testing/plugins_integration/twisted-22.1.0
2022-02-11 07:28:32 -03:00
dependabot[bot]
2b12739412
build(deps): Bump twisted in /testing/plugins_integration
...
Bumps [twisted](https://github.com/twisted/twisted ) from 21.7.0 to 22.1.0.
- [Release notes](https://github.com/twisted/twisted/releases )
- [Changelog](https://github.com/twisted/twisted/blob/trunk/NEWS.rst )
- [Commits](https://github.com/twisted/twisted/compare/twisted-21.7.0...twisted-22.1.0 )
---
updated-dependencies:
- dependency-name: twisted
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-02-11 03:47:43 +00:00
Bruno Oliveira
3586edc1c9
Merge pull request #9646 from nicoddemus/9643-delay-warning
2022-02-10 14:11:21 -03:00
Bruno Oliveira
88c35123b8
Delay warning about collector/item diamond inheritance
...
This allows that warning to be filtered by `filterwarnings`.
Fix #9643
2022-02-10 13:50:25 -03:00
Florian Bruhin
6aaa017b1e
doc: Discourage squashing for release ( #9657 )
...
Fixes #9655
2022-02-10 08:58:20 +01:00
Ran Benita
2b6708b892
Merge pull request #9624 from bluetech/unittest-getobj
...
unittest: restore `UnitTestFunction.obj` to return unbound rather than bound method
2022-02-09 22:43:31 +02:00
Ran Benita
23bdf78654
Merge pull request #9651 from bluetech/rename-pythonpath
...
Rename ``pythonpath`` plugin to ``python_path``
2022-02-09 13:20:22 +02:00
Ran Benita
01e1de7a1a
Rename `pythonpath plugin to python_path`
...
Fix #9636 .
2022-02-09 10:03:20 +02:00
Ran Benita
04a6f52d67
Merge pull request #9611 from pllim/patch-1
...
DOC: pytest.warns() fails on zero warning
2022-02-08 16:00:06 +02:00
Ran Benita
4bf764f9a3
Merge pull request #9625 from pytest-dev/dependabot/pip/testing/plugins_integration/django-4.0.2
...
build(deps): Bump django from 4.0.1 to 4.0.2 in /testing/plugins_integration
2022-02-08 15:59:19 +02:00
Ran Benita
44290d1f6c
Merge pull request #9609 from kdelee/patch-1
...
importlib.readers not valid until python 3.10
2022-02-08 15:57:48 +02:00
Ran Benita
fb378ea269
Merge pull request #9639 from bluetech/docs-django-https
...
doc: remove django intersphinx mapping
2022-02-08 15:57:06 +02:00
Anthony Sottile
c326c04494
Merge pull request #9642 from pytest-dev/run-testid-with-colon-colon
...
allow running testids which contain :: in the parametrized portion
2022-02-08 08:34:49 -05:00
Anthony Sottile
efa16c2c9d
Merge pull request #9641 from asottile/fix-test-pollution-assertrewrite
...
fix test pollution in test_assertrewrite
2022-02-08 08:34:12 -05:00
Anthony Sottile
2442034a1e
allow running testids which contain :: in the parametrized portion
2022-02-07 20:19:59 -05:00
Anthony Sottile
579785b6cd
fix test pollution in test_assertrewrite
...
originally reproduced with this pollution set:
```
testing/test_assertrewrite.py::TestEarlyRewriteBailout::test_pattern_contains_subdirectories
testing/test_assertrewrite.py::TestRewriteOnImport::test_remember_rewritten_modules
```
2022-02-07 19:29:18 -05:00
Ran Benita
b80472c5bc
doc: fix a reference
2022-02-08 00:53:17 +02:00
dependabot[bot]
ef7d67b665
build(deps): Bump django in /testing/plugins_integration
...
Bumps [django](https://github.com/django/django ) from 4.0.1 to 4.0.2.
- [Release notes](https://github.com/django/django/releases )
- [Commits](https://github.com/django/django/compare/4.0.1...4.0.2 )
---
updated-dependencies:
- dependency-name: django
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-02-07 22:47:20 +00:00
Ran Benita
1612d3d1af
doc: remove django intersphinx mapping
...
Initially I just wanted to fix http -> https, but I think it's not worth
having at all just for this one reference.
2022-02-08 00:46:20 +02:00
Ran Benita
d00ca3f8e5
unittest: restore UnitTestFunction.obj to return unbound rather than bound method
...
This fixes #9610 .
pytest 7.0.0 (unintentionally) changed `UnitTestFunction.obj`'s' behavior
to match `Function.obj`. That is probably a good thing to have, however
it evidently causes some regressions as described in the issue, so
restore the previous behavior for now. In the future we might want to
make this change again, but with proper consideration.
2022-02-08 00:46:00 +02:00
pre-commit-ci[bot]
2073cce105
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2022-02-08 00:44:52 +02:00
Elijah DeLee
d45a19cfde
move function specific imports to function
...
re: review from @asottile that this should only get imported in the function
modify the else/if logic since inside the function we already know the python version is >= 3.10, and just have to know if it is 3.11 or greater
2022-02-08 00:44:52 +02:00
Bruno Oliveira
f86a87a315
Update src/_pytest/assertion/rewrite.py
...
Co-authored-by: Ran Benita <ran@unusedvar.com >
2022-02-08 00:44:52 +02:00
Bruno Oliveira
66dc79efd4
Update changelog/9608.bugfix.rst
...
Co-authored-by: Elijah DeLee <kdelee@redhat.com >
2022-02-08 00:44:52 +02:00
Bruno Oliveira
5f1a2f33da
Fix invalid importing of importlib.reader in Python 3.9
...
Fix #9608
2022-02-08 00:44:52 +02:00
Elijah DeLee
15ddccf700
importlib.readers not valid until python 3.10
...
This exists https://github.com/python/cpython/blob/3.10/Lib/importlib/readers.py and FileReader is in there
This is a 404 https://github.com/python/cpython/blob/3.9/Lib/importlib/readers.py
This change needs to get backported to the 7.0.z branch(s) too
Fixes https://github.com/pytest-dev/pytest/issues/9608
2022-02-08 00:44:52 +02:00
Anthony Sottile
bc33ba0be9
Merge pull request #9638 from asottile/fix-test-pollution
...
work around test pollution caused by new setuptools mutating global logger level
2022-02-07 17:19:01 -05:00
Anthony Sottile
b3692fe404
work around test pollution caused by new setuptools mutating global logger level
2022-02-07 15:10:03 -05:00
Ran Benita
6f936aa97c
Merge pull request #9622 from pytest-dev/update-plugin-list/patch-18c0cfc0d
...
[automated] Update plugin list
2022-02-07 15:09:58 +02:00
pytest bot
2c3be75b09
[automated] Update plugin list
2022-02-06 00:13:55 +00:00
Ran Benita
18c0cfc0de
Merge pull request #9612 from bluetech/namedtuple-class
...
mark/structures: use class-based NamedTuple syntax
2022-02-05 12:16:00 +02:00
Ran Benita
20c2c30ff2
mark/structures: use class-based NamedTuple syntax
...
Should hopefully work now in Python>=3.7.
2022-02-05 11:52:36 +02:00
P. L. Lim
d1b394af88
DOC: pytest.warns() fails on zero warning
2022-02-04 17:45:04 -05:00
Florian Bruhin
77a38a3b75
doc: Add changing RTD version to checklist ( #9606 )
...
I still think it makes sense to always serve docs from the release branch (rather than the latest tagged release), but that means we need to update it on new releases.
2022-02-04 17:36:31 +01:00
Gabor Szabo
57f8f5d2b3
Mention basetemp in docs as a way to only keep last temp dir ( #9607 )
...
Closes #9599
2022-02-04 12:38:26 +00:00
Florian Bruhin
b5a168aa0e
doc: Streamline remote handling in releasing docs ( #9603 )
...
The docs already assume an 'upstream' remote, so we can only fetch from there instead of fetching all remotes. We also don't need to hardcode the remote URL.
2022-02-04 12:13:33 +01:00
Florian Bruhin
48f01bdcc2
doc: Hide done training ( #9602 )
...
Only commenting out as I expect to add trainings at PyConDE and possibly PyConIT soon
2022-02-04 12:12:58 +01:00
Florian Bruhin
dff1a15881
ci: Add missing macOS CI envs ( #9601 )
...
alinsa_vix in Discord noticed that we are not testing Python 3.9 and 3.10 on macOS, which seems strange. Maybe this is due how to macOS CI resources were quite scarce for a while, but I believe this has improved since.
2022-02-04 12:11:30 +01:00
Florian Bruhin
dfa7023862
Prepare release 7.0.0 ( #9598 ) ( #9604 )
...
* Prepare release version 7.0.0
* Add note to changelog
Co-authored-by: pytest bot <pytestbot@gmail.com >
Co-authored-by: Florian Bruhin <me@the-compiler.org >
(cherry picked from commit e37fbe5685 )
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-02-04 07:48:24 -03:00
Florian Bruhin
2982753d80
releasing: Add template for major releases ( #9596 )
...
* releasing: Add template for major releases
With pytest 6.0.0, we still used a manual releasing workflow (at least if I
remember correctly), and apparently we never wrote a release announcement
template for major releases. Instead, the minor release template claimed that
the release would contain "breaking changes", which doesn't seem reasonable.
Thus, this adds a new major template based on the former minor template, and
adjusts the latter to only mention fixes and new features instead.
* Update scripts/release.minor.rst
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com >
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com >
2022-02-03 15:33:07 +00:00
Florian Bruhin
12b288d84a
releasing: Always set doc_version ( #9589 )
...
Looks like something (tox?) does not deal with empty arguments being passed to release.py correctly
2022-02-03 11:48:55 +01:00
Anthony Sottile
90b1c93f7e
Merge pull request #9585 from pytest-dev/pre-commit-ci-update-config
...
[pre-commit.ci] pre-commit autoupdate
2022-02-01 01:32:31 -05:00
pre-commit-ci[bot]
9d2ffe207b
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2022-01-31 22:20:16 +00:00
pre-commit-ci[bot]
3aef0b9de6
[pre-commit.ci] pre-commit autoupdate
...
updates:
- [github.com/psf/black: 21.12b0 → 22.1.0](https://github.com/psf/black/compare/21.12b0...22.1.0 )
- [github.com/asottile/blacken-docs: v1.12.0 → v1.12.1](https://github.com/asottile/blacken-docs/compare/v1.12.0...v1.12.1 )
- [github.com/asottile/reorder_python_imports: v2.6.0 → v2.7.1](https://github.com/asottile/reorder_python_imports/compare/v2.6.0...v2.7.1 )
2022-01-31 22:18:51 +00:00
Bruno Oliveira
4b1d9092a8
Merge pull request #9579 from pytest-dev/update-plugin-list/patch-ee9ddff34
2022-01-31 11:37:05 -03:00
Bruno Oliveira
232f44369a
Merge pull request #9581 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-mock-3.7.0
2022-01-31 09:14:21 -03:00
dependabot[bot]
b2701a0272
build(deps): Bump pytest-mock in /testing/plugins_integration
...
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock ) from 3.6.1 to 3.7.0.
- [Release notes](https://github.com/pytest-dev/pytest-mock/releases )
- [Changelog](https://github.com/pytest-dev/pytest-mock/blob/main/CHANGELOG.rst )
- [Commits](https://github.com/pytest-dev/pytest-mock/compare/v3.6.1...v3.7.0 )
---
updated-dependencies:
- dependency-name: pytest-mock
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-01-31 03:02:08 +00:00
pytest bot
321747628e
[automated] Update plugin list
2022-01-30 00:12:51 +00:00
Florian Bruhin
ee9ddff34e
doc: Recategorize 7.0.0 changelog items ( #9561 )
2022-01-27 12:39:32 +00:00
Florian Bruhin
6e1445b521
ci: Bump up timeout ( #9560 )
...
macOS apparently can be slow, https://github.com/pytest-dev/pytest/runs/4965510831 for #9556 got cancelled at 91%
2022-01-27 13:33:20 +01:00
Florian Bruhin
597bb9376b
Add missing cooperative constructor changelog ( #9559 )
...
This was supposed to be part of #9488 , but I only now noticed it was lying around uncommitted in my git dir
2022-01-27 13:33:09 +01:00
Florian Bruhin
843f03e3ca
doc: Add ellipsis to warning usecase list ( #9558 )
...
I feel like this makes it clearer where the code which was inside 'pytest.warns' is supposed to go.
2022-01-27 13:32:37 +01:00
Bruno Oliveira
f064942f2e
Make 'warnings' and 'deselected' in assert_outcomes optional ( #9475 )
...
Fix #9471
2022-01-27 12:18:36 +01:00
Florian Bruhin
396a7def75
Add additional docs for uncooperative ctor deprecation ( #9498 )
...
* Add additional docs for uncooperative ctor deprecation
Fixes #9488
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Break up long line
* Recommend kwonly args
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-01-27 11:49:18 +01:00
Ran Benita
cd8bfa94ec
Merge pull request #9545 from bluetech/doc-version
...
doc/reference: don't document `pytest.__version__` under "Marks"
2022-01-27 10:46:28 +02:00
Ran Benita
04bddfc655
Merge pull request #9547 from bluetech/refactor-idmaker
...
Refactor idmaker functions into class IdMaker
2022-01-27 10:46:08 +02:00
Tobias Deiminger
b21b008118
Refactor idmaker functions into class IdMaker
...
This commit only refactors, it does not change or add functionality yet. Public
API is retained. Reason or refactoring:
User provided parameter IDs (e.g. Metafunc.parametrize(ids=...)) had so far
only been used to calculate a unique test ID for each test invocation. That
test ID was a joined string where each parameter contributed some partial ID.
We're soon going to reuse functionality to generate parameter keys for
reorder_items and FixtureDef cache. We will be interested in the partial
IDs, and only if they originate from explicit user information. Refactoring
makes logic and data accessible for reuse, and increases cohesion in general.
2022-01-26 15:42:34 +02:00
Ran Benita
acd2034535
fixtures: document FixtureDef's attributes
2022-01-25 23:44:59 +02:00
Ran Benita
52fbf3dbaa
fixtures: make code flow clearer
...
Make the two cases (direct/indirect fixture) clearer. The try-catch
forces the reader to jump around.
2022-01-25 22:44:04 +02:00
Ran Benita
e6166ccc3c
doc/reference: don't document pytest.__version__ under "Marks"
2022-01-25 22:39:13 +02:00
Ran Benita
5c69eced6c
Merge pull request #9532 from bluetech/getdir-cache
...
config: avoid stat storm in _getconftestmodules
2022-01-25 16:21:44 +02:00
Akuli
a17e708352
With -vv, display the full skip/xfail reason instead of "..." ( #9537 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-01-25 10:33:22 -03:00
Anthony Sottile
382e3d346e
Merge pull request #9539 from pytest-dev/all-repos_autofix_flake8-typing-imports
...
upgrade flake8-typing-imports
2022-01-24 08:56:04 -05:00
Bruno Oliveira
2907252693
Merge pull request #9528 from SalmonMode/autouse-linearization-graph
2022-01-24 07:47:43 -03:00
Anthony Sottile
039c3a201d
upgrade flake8-typing-imports
...
Committed via https://github.com/asottile/all-repos
2022-01-23 21:21:26 -05:00
Andrew Svetlov
b9fc678770
Merge pull request #9538 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-asyncio-0.17.2
...
build(deps): Bump pytest-asyncio from 0.16.0 to 0.17.2 in /testing/plugins_integration
2022-01-23 23:23:53 +02:00
Andrew Svetlov
9ae64aae56
Setup strict asyncio mode
2022-01-23 23:07:28 +02:00
dependabot[bot]
7783fb1b1e
build(deps): Bump pytest-asyncio in /testing/plugins_integration
...
Bumps [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio ) from 0.16.0 to 0.17.2.
- [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases )
- [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v0.16.0...v0.17.2 )
---
updated-dependencies:
- dependency-name: pytest-asyncio
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-01-23 20:37:56 +00:00
Ran Benita
00085391fb
Merge pull request #9518 from pytest-dev/dependabot/pip/testing/plugins_integration/anyio-curiotrio--3.5.0
...
build(deps): Bump anyio[curio,trio] from 3.4.0 to 3.5.0 in /testing/plugins_integration
2022-01-23 22:02:15 +02:00
Ran Benita
bc296443bd
Merge pull request #9534 from pytest-dev/update-plugin-list/patch-bb5a4e2d6
...
[automated] Update plugin list
2022-01-23 21:46:43 +02:00
pytest bot
dddadefa68
[automated] Update plugin list
2022-01-23 00:12:46 +00:00
Ran Benita
aee04cd49f
config: avoid stat storm in _getconftestmodules
...
Fix #9478 .
2022-01-22 00:27:43 +02:00
Ran Benita
bb5a4e2d63
Merge pull request #9531 from bluetech/misc
...
python: fix confused docstring of `Metafunc._resolve_arg_ids`
2022-01-21 17:24:56 +02:00
Ran Benita
471634d6bd
python: fix confused docstring of Metafunc._resolve_arg_ids
...
The docstring (and function name itself) described things as if IDs are
being assigned to the argnames, but actually they're assigned to the
parameter sets.
2022-01-21 16:18:44 +02:00
Ran Benita
888026f7a6
Merge pull request #9171 from bluetech/optimize-keywords-init
...
Optimizations/fixes around Function `keywords`
2022-01-21 15:19:53 +02:00
Ran Benita
6d128cd52e
python: use a more memory-friendly generator
2022-01-21 14:35:25 +02:00
Ran Benita
74571ba55f
Add missing keywords type annotations
2022-01-21 14:35:25 +02:00
Ran Benita
456a2538ac
python: optimize node keywords initialization
...
If we do the `update`s in the right order, we can avoid the `mark.name
not in self.keywords` check, since `self.keywords` starts out clean and
`update` will override previously set keywords.
2022-01-21 14:35:25 +02:00
Ran Benita
3c69bc919c
python: remove broken/ineffectual keywords marks initialization
...
By my analysis, this deleted code block has no effect:
1. `self.keywords` is `update`d with `callspec.marks`.
2. `self.own_markers` is `update`d with `callspec.marks`.
3. `self.keywords` is `update`d with `self.own_markers`.
So together steps 2+3 completely undo step 1.
2022-01-21 14:35:24 +02:00
Ran Benita
d9bcfa0c2b
python: don't redundantly duplicate parent markers to own keywords
...
This does have a slight semantic change: in a node hierarchy parent ->
child, if parent has a marker applied, then child is constructed, then
`parent.themarker = "overridden"`, previously
`child.keywords['themarker']` would return `True`, now it returns
`"overridden"`. But that's actually what I would have expected so I see
it as more of a bugfix.
2022-01-21 14:34:27 +02:00
Ran Benita
8713c32462
python: unpacked marks need to be added to keywords on all node types
...
(except `Instance`)
Currently, `Function` does this manually, but other node types don't get
their markers added to their `keywords`, but they should, if only for
consistency.
2022-01-21 14:34:27 +02:00
Ran Benita
e9bb1aa233
python: be consistent with what value marks have in keywords
...
Marks are added to keywords in three places:
- `Node.add_marker`: name -> `Mark`
- `Function.__init__(callspec)`: name -> `Mark`
- `Function.__init__ iter_markers`: name -> True
I think it should be consistent, which will also help with some upcoming
code cleaning. The `Mark` seems more useful than just a `True`, so
switch to that.
2022-01-21 14:34:27 +02:00
Ran Benita
4e5fb520b6
python: remove an unneeded normalize_mark_list call
...
`callspec.mark` is already `List[Mark]` so no need to normalize it.
2022-01-21 14:34:27 +02:00
Ran Benita
6672a10354
fixtures: use node.ihook instead of open-coding it
2022-01-21 14:29:47 +02:00
Bruno Oliveira
4c8fb6f0af
Merge pull request #9522 from holmanb/rewrite-test
2022-01-20 13:18:12 -03:00
Chris NeJame
1fd0dcd510
fix missing ref to flattened fixture order image
2022-01-19 09:26:07 -05:00
Brett Holman
3f44b4078c
Add test coverage to test rewrite
2022-01-18 11:26:46 -07:00
dependabot[bot]
c393f95c99
build(deps): Bump anyio[curio,trio] in /testing/plugins_integration
...
Bumps [anyio[curio,trio]](https://github.com/agronholm/anyio ) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/agronholm/anyio/releases )
- [Changelog](https://github.com/agronholm/anyio/blob/master/docs/versionhistory.rst )
- [Commits](https://github.com/agronholm/anyio/compare/3.4.0...3.5.0 )
---
updated-dependencies:
- dependency-name: anyio[curio,trio]
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-01-17 03:02:30 +00:00
Bruno Oliveira
fe1f0e5376
Merge pull request #9516 from pytest-dev/update-plugin-list/patch-a6310c20c
...
[automated] Update plugin list
2022-01-16 09:03:31 -03:00
pytest bot
947b5dbc47
[automated] Update plugin list
2022-01-16 00:13:41 +00:00
Ran Benita
a6310c20c1
Merge pull request #9512 from bluetech/pluggy-private
...
testing: avoid private pluggy attributes in test
2022-01-14 18:09:10 +02:00
Ran Benita
3f4eab3f8f
testing: avoid private pluggy attributes in test
2022-01-14 17:49:38 +02:00
Olga Matoula
2ad1b589af
Add docs on pytest.warns(None) deprecation ( #9495 )
...
* Add docs on pytest.warns(None) deprecation
* Add new section for common warnings use cases
* Fix references for warnings use cases
* Fix reference link
2022-01-13 18:32:22 +00:00
Bruno Oliveira
e9ed4827a4
Merge pull request #9506 from eamanu/fix-9505
2022-01-13 13:52:09 -03:00
Emmanuel Arias
5c2d752e74
improve docs
2022-01-13 13:29:08 -03:00
Emmanuel Arias
0fe0b78a9f
Improve on configuration file docs section
...
To avoid confusions the part of that "the configuration file can
be locate on your tests folder" is removed.
2022-01-13 12:52:18 -03:00
Ran Benita
f1aa7a25de
Merge pull request #9493 from bluetech/conftesting
...
Some conftest changes
2022-01-12 10:38:14 +02:00
Anthony Sottile
202e44b5e6
Merge pull request #9500 from pytest-dev/pre-commit-ci-update-config
...
[pre-commit.ci] pre-commit autoupdate
2022-01-10 18:33:35 -05:00
pre-commit-ci[bot]
8891d1f449
[pre-commit.ci] pre-commit autoupdate
...
updates:
- [github.com/pre-commit/mirrors-mypy: v0.930 → v0.931](https://github.com/pre-commit/mirrors-mypy/compare/v0.930...v0.931 )
2022-01-10 21:28:04 +00:00
Ran Benita
a425f15330
Merge pull request #9494 from bluetech/instance-property
...
python: add back `instance` accessor to all python nodes, not just Function
2022-01-10 21:08:46 +02:00
Bruno Oliveira
610edd156e
Merge pull request #9497 from pytest-dev/dependabot/pip/testing/plugins_integration/django-4.0.1
...
build(deps): Bump django from 4.0 to 4.0.1 in /testing/plugins_integration
2022-01-10 07:58:56 -03:00
dependabot[bot]
0d5f52b127
build(deps): Bump django in /testing/plugins_integration
...
Bumps [django](https://github.com/django/django ) from 4.0 to 4.0.1.
- [Release notes](https://github.com/django/django/releases )
- [Commits](https://github.com/django/django/compare/4.0...4.0.1 )
---
updated-dependencies:
- dependency-name: django
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-01-10 03:02:30 +00:00
Ran Benita
0995e84adb
Merge pull request #9492 from pytest-dev/update-plugin-list/patch-abe2a8f4e
...
[automated] Update plugin list
2022-01-09 13:14:03 +02:00
Ran Benita
161bc48117
config: get rid of _conftestpath2mod
...
It duplicates what PluginManager already knows, and no longer needed now
that symlinks are not resolved (see previous commit).
2022-01-09 12:33:45 +02:00
Ran Benita
0ef882364e
config: stop resolving symlinks in conftest paths
...
This became the wrong thing to do since
322190fd84 .
2022-01-09 12:33:45 +02:00
Ran Benita
f08a77de77
python: add back instance accessor to all python nodes, not just Function
...
Regressed in 062d91ab4 (pytest 7.0.0rc1 only).
Fix #9486 .
2022-01-09 12:14:46 +02:00
pytest bot
f0dab8ba8d
[automated] Update plugin list
2022-01-09 00:12:59 +00:00
Ran Benita
d98b695fec
config: return Sequence instead of List from _getconftestmodules
...
Nothing should mutate the internal data structure here.
2022-01-09 00:30:18 +02:00
Ran Benita
ed83efaf4b
testing/test_monkeypatch: fix some patches leaking into pytest code
...
The tests patch `os.path.abspath` which can break some pytest internal
code since the patching is not undone immediately.
2022-01-09 00:13:40 +02:00
Ran Benita
0c98f19231
config: make confcutdir check a bit more clear & correct
...
I think this named function makes the code a bit easier to understand.
Also change the check to explicitly check for "is a sub-path of" instead
of the previous check which only worked assuming that path is within
confcutdir or a direct parent of it.
2022-01-08 22:48:40 +02:00
Ran Benita
1c7644cc7a
config: some comments
2022-01-08 22:30:48 +02:00
Ran Benita
5f23157b39
config: remove always truthy condition
2022-01-08 12:36:43 +02:00
Ran Benita
abe2a8f4e1
Merge pull request #9484 from bluetech/getconftestmodules-cache-fix
...
config: fix incorrect cache hit check in _getconftestmodules
2022-01-07 13:27:45 +02:00
Ran Benita
b19374bc19
config: fix incorrect cache hit check in _getconftestmodules
...
This made the cache not work as intended, causing a major slowdown.
See #9478 for discussion and context.
Authored-by: Anthony Sottile <asottile@umich.edu >
2022-01-07 12:47:39 +02:00
Dan Alvizu
71baf24b6d
Doc update: clarify -W syntax ( #9464 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com >
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com >
2022-01-04 13:55:01 +00:00
Bruno Oliveira
fa43b8dfb2
Merge pull request #9400 from nicoddemus/configinifile-9396
2022-01-04 10:22:35 -03:00
Bruno Oliveira
696f955ff8
Split wrappers and non-wrappers in test_load_initial_conftest_last_ordering
...
Seems better to test which one is which explicitly.
2022-01-04 10:03:30 -03:00
Bruno Oliveira
4038752bf3
Ensure Config.inifile is available during pytest_cmdline_main
...
Fix #9396
2022-01-04 10:03:28 -03:00
Anthony Sottile
1860140460
Merge pull request #9472 from pytest-dev/pre-commit-ci-update-config
...
[pre-commit.ci] pre-commit autoupdate
2022-01-03 19:43:46 -05:00
pre-commit-ci[bot]
b6350b8b97
[pre-commit.ci] pre-commit autoupdate
...
updates:
- [github.com/asottile/pyupgrade: v2.29.1 → v2.31.0](https://github.com/asottile/pyupgrade/compare/v2.29.1...v2.31.0 )
2022-01-03 21:08:03 +00:00
github-actions[bot]
56081ca075
[automated] Update plugin list ( #9468 )
...
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com >
2022-01-03 18:57:32 +01:00
Florian Bruhin
d60771f986
ci: Try backporting via pull_request_target ( #9430 )
...
* ci: Try backporting via pull_request_target
* ci: Security improvements
2022-01-03 14:14:40 +00:00
Anthony Sottile
548cc4fc17
Merge pull request #9467 from hugovk/ci-rm-feature-branch-restriction
...
Remove branch restriction to allow testing feature branches
2022-01-01 18:29:14 -05:00
Hugo van Kemenade
819c67f58e
Also test branches prefixed test-me-
2022-01-01 23:36:10 +02:00
Anthony Sottile
9a992df3c9
Merge pull request #9455 from pytest-dev/pre-commit-ci-update-config
...
[pre-commit.ci] pre-commit autoupdate
2021-12-30 11:54:49 -05:00
Anthony Sottile
b0aabe4081
fix mypy 0.930 errors
2021-12-30 06:19:29 -08:00
pre-commit-ci[bot]
cbccc06302
[pre-commit.ci] pre-commit autoupdate
...
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.0.1 → v4.1.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.0.1...v4.1.0 )
- [github.com/pre-commit/mirrors-mypy: v0.920 → v0.930](https://github.com/pre-commit/mirrors-mypy/compare/v0.920...v0.930 )
2021-12-30 06:19:29 -08:00
Bruno Oliveira
3c8c0d2a33
Merge pull request #9461 from hugovk/main
2021-12-30 08:49:55 -03:00
Hugo van Kemenade
61417b2551
Drop support for EOL Python 3.6
2021-12-30 13:25:34 +02:00
Bruno Oliveira
325744ef86
Merge pull request #9460 from hugovk/rm-3.6
2021-12-30 08:18:44 -03:00
Hugo van Kemenade
1fd3601caa
Drop support for EOL Python 3.6
2021-12-30 12:37:18 +02:00
Ran Benita
b9663fed6f
Merge pull request #9442 from hramezani/drop_python_36
...
Drop Python3.6 in CI, setup.cfg, and readme.
2021-12-30 12:22:13 +02:00
Hasan Ramezani
0b7c3d1145
Remove Python 3.6 related warning from filterwarnings.
2021-12-28 17:09:27 +01:00
Ran Benita
79dbd19780
Merge pull request #9410 from pytest-dev/dependabot/pip/testing/plugins_integration/django-4.0
...
build(deps): Bump django from 3.2.10 to 4.0 in /testing/plugins_integration
2021-12-28 18:04:33 +02:00
dependabot[bot]
4eebfb2f19
build(deps): Bump django in /testing/plugins_integration
...
Bumps [django](https://github.com/django/django ) from 3.2.10 to 4.0.
- [Release notes](https://github.com/django/django/releases )
- [Commits](https://github.com/django/django/compare/3.2.10...4.0 )
---
updated-dependencies:
- dependency-name: django
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-12-28 15:16:38 +00:00
Ran Benita
755e2509b6
Merge pull request #9456 from bluetech/tox-plugins-py
...
ci: run plugins job with python 3.9 instead of 3.7
2021-12-28 17:15:35 +02:00
Hasan Ramezani
e5bf3784a4
Update required Python version in docs.
2021-12-28 15:15:52 +01:00
Hasan Ramezani
b72ad0fa8e
Remove has_flags conditions from src._pytest.assertion.rewrite._read_pyc
2021-12-28 10:11:45 +01:00
Hasan Ramezani
77042f77cc
Remove breakpoint support checking since all python versions support it.
2021-12-28 10:11:45 +01:00
Hasan Ramezani
400915067f
Move nullcontext import to src._pytest.logging.
2021-12-28 10:11:45 +01:00
Hasan Ramezani
3d7cd77017
Update syntax to Python3.7+.
2021-12-28 10:11:35 +01:00
Ran Benita
1522afa1cd
ci: run plugins job with python 3.9 instead of 3.7
...
Latest Django release dropped support for 3.7.
2021-12-28 11:01:23 +02:00
Ran Benita
1131f23e04
Merge pull request #9451 from bluetech/code-path-changelog
...
doc: document {Code,TracebackEntry}.path changes as breaking
2021-12-27 16:59:42 +02:00
Ran Benita
0db1ff0d82
doc: document {Code,TracebackEntry}.path changes as breaking
...
Closes #9423 .
2021-12-27 15:27:38 +02:00
Ran Benita
69da199f6e
Merge pull request #9438 from bluetech/pytest-legacypath-imports
...
pytest: bring back direct imports of TempdirFactory, Testdir
2021-12-27 15:03:05 +02:00
Ran Benita
fcef7e49fd
Merge pull request #9447 from bluetech/code-cut-pathlike
...
code: accept any `os.PathLike[str]` in `Traceback.cut`
2021-12-27 15:02:20 +02:00
Kian Meng, Ang
55debfad1f
Fix typos ( #9424 )
2021-12-27 09:23:15 -03:00
Ran Benita
0da4760715
code: accept any os.PathLike[str] in Traceback.cut
...
Before 7.0.0rc1, the function accepted `Union[str, py.path.local]`, and
`py.path.local` compares equal to the string path, so a user was able to
pass the path as a string and it would work. In 7.0.0rc1 we changed the
`py.path.local` to `Path` which doesn't compare equal to the string
path, which breaks compatibility (e.g. the `sybil` package).
This restores compatibility for this function by accepting any
`os.PathLike[str]` and only comparing the string representations.
2021-12-27 11:26:32 +02:00
Ran Benita
7a42db2bf0
Merge pull request #9443 from bluetech/undocumented-hooks
...
doc/reference: add 4 missing hooks to reference
2021-12-27 11:11:56 +02:00
Ran Benita
7fc2cf51c2
Merge pull request #9441 from bluetech/nose-setup-callable
...
python: skip nose setup/teardown fixtures if non-callable
2021-12-27 11:09:51 +02:00
Hasan Ramezani
5599c5ad45
Drop Python3.6 in CI, setup.cfg, and readme.
2021-12-26 21:08:37 +01:00
Bruno Oliveira
09c0bee288
Merge pull request #9444 from pytest-dev/update-plugin-list/patch-443aa0219
...
[automated] Update plugin list
2021-12-26 14:10:28 -03:00
Anthony Sottile
d39780f30b
Merge pull request #9428 from pytest-dev/pre-commit-ci-update-config
...
[pre-commit.ci] pre-commit autoupdate
2021-12-26 11:50:46 -05:00
pytest bot
427f035b76
[automated] Update plugin list
2021-12-26 00:14:18 +00:00
Ran Benita
05d46ca850
doc/reference: add 4 missing hooks to reference
...
Fix #9434 .
2021-12-25 13:54:42 +02:00
Ran Benita
3128080806
pytest: bring back direct imports of TempdirFactory, Testdir
...
The monkeypatch approach doesn't work for `import pytest;
pytest.TempdirFactory`.
Fix #9432 .
2021-12-25 13:27:02 +02:00
Ran Benita
10e21dadee
python: skip nose setup/teardown fixtures if non-callable
...
Since commit 89f0b5b5a2 cases as in the
added test started to fail, like they do for the standard pytest names
(`setup_module` etc). But the name `setup` in particular is way too
common for us to start taking it over more aggressively, so restore the
previous behavior which required the object to be callable.
Fix #9391 .
2021-12-25 12:09:11 +02:00
Ran Benita
443aa0219c
Merge pull request #9416 from bluetech/doc-stash-fix
...
doc: fix a reference in "Writing hook functions"
2021-12-25 10:49:40 +02:00
Ran Benita
8071ad6b90
doc: fix a reference in "Writing hook functions"
2021-12-25 10:30:59 +02:00
Ran Benita
0fecfff2be
Merge pull request #9425 from pytest-dev/update-plugin-list/patch-47df71d23
...
[automated] Update plugin list
2021-12-23 11:07:22 +02:00
Anthony Sottile
c69b84f236
fix typing issues in mypy 0.920
2021-12-21 20:42:32 -05:00
pre-commit-ci[bot]
e358bc65a8
[pre-commit.ci] pre-commit autoupdate
...
updates:
- [github.com/pre-commit/mirrors-mypy: v0.910-1 → v0.920](https://github.com/pre-commit/mirrors-mypy/compare/v0.910-1...v0.920 )
2021-12-20 20:42:31 +00:00
pytest bot
a73a9a12a2
[automated] Update plugin list
2021-12-19 00:12:37 +00:00
Bruno Oliveira
47df71d23f
Merge pull request #9417 from nicoddemus/fix-py3.10.1-9413
2021-12-16 10:37:52 -03:00
Bruno Oliveira
913439f5e5
Fix test_errors_in_xfail_skip_expressions for Python 3.10.1
...
Decided to remove the condition altogether as seems reasonable to state
that our own test suite requires Python 3.10.1.
Fix #9413
2021-12-16 10:18:07 -03:00
Yuval Shimon
3bbadda0cf
Merge pull request #9407 from yuvalshi0/remove-eq-format
...
Avoid specialized assert formatting when we detect that __eq__ is overridden
2021-12-14 10:53:56 +02:00
Bruno Oliveira
d8ff487b07
Merge pull request #9411 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-django-4.5.2
2021-12-13 08:54:31 -03:00
dependabot[bot]
a3cf2ad3bc
build(deps): Bump pytest-django in /testing/plugins_integration
...
Bumps [pytest-django](https://github.com/pytest-dev/pytest-django ) from 4.5.1 to 4.5.2.
- [Release notes](https://github.com/pytest-dev/pytest-django/releases )
- [Changelog](https://github.com/pytest-dev/pytest-django/blob/master/docs/changelog.rst )
- [Commits](https://github.com/pytest-dev/pytest-django/compare/v4.5.1...v4.5.2 )
---
updated-dependencies:
- dependency-name: pytest-django
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-12-13 03:02:33 +00:00
Ran Benita
8040cfd965
Merge pull request #9401 from bluetech/doc-hooks-ref
...
doc: add a `hook` crossref type
2021-12-12 18:02:53 +02:00
Ran Benita
ab8c9848a0
Merge pull request #9408 from pytest-dev/dependabot/pip/testing/plugins_integration/django-3.2.10
...
build(deps): Bump django from 3.2.9 to 3.2.10 in /testing/plugins_integration
2021-12-12 18:02:27 +02:00
Ran Benita
0e69c62ece
doc: add a hook crossref type
...
Allow writing
🪝 `pytest_cmdline_main`
instead of
:func:`pytest_cmdline_main <_pytest.hookspec.pytest_cmdline_main>`
2021-12-12 16:29:30 +02:00
dependabot[bot]
4d6e8a310b
build(deps): Bump django in /testing/plugins_integration
...
Bumps [django](https://github.com/django/django ) from 3.2.9 to 3.2.10.
- [Release notes](https://github.com/django/django/releases )
- [Commits](https://github.com/django/django/compare/3.2.9...3.2.10 )
---
updated-dependencies:
- dependency-name: django
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-12-12 14:26:36 +00:00
Ran Benita
37d44434d8
Merge pull request #9405 from bluetech/ci-backport
...
ci: add a workflow for backporting to other branches
2021-12-12 16:26:11 +02:00
Bruno Oliveira
0bc77de158
Merge pull request #9406 from pytest-dev/update-plugin-list/patch-dd609e150
...
[automated] Update plugin list
2021-12-12 11:22:11 -03:00
Yuval Shimon
0ea039db60
adding auto_detect=true test
2021-12-12 16:11:33 +02:00
Yuval Shimon
0c45065040
removing coverage on eq method
2021-12-12 15:39:30 +02:00
Yuval Shimon
7cf2b51d8e
Merge branch 'pytest-dev:main' into remove-eq-format
2021-12-12 15:16:58 +02:00
Yuval Shimon
2d7905b13b
support pypy
2021-12-12 15:14:24 +02:00
Yuval Shimon
df74e5c532
fixing pre-commit
2021-12-12 14:53:29 +02:00
pre-commit-ci[bot]
9166ff6cb5
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2021-12-12 12:49:24 +00:00
Yuval Shimon
8c3b17263b
removing unnecessary changes
2021-12-12 14:47:00 +02:00
Yuval Shimon
a67c547536
fixing tests
2021-12-12 14:45:47 +02:00
Yuval Shimon
31f42ef83f
small fix
2021-12-12 14:40:46 +02:00
Yuval Shimon
897395afd5
fix 9326
2021-12-12 14:38:45 +02:00
pytest bot
99a8be200a
[automated] Update plugin list
2021-12-12 00:12:01 +00:00
Ran Benita
c85b14391d
ci: add a workflow for backporting to other branches
...
To backport a PR, e.g. 1000, to another branch, e.g. `7.0.x`, add a
label `backport 7.0.x` to the PR. This will trigger a workflow which
will create a branch `backport-1000-to-7.0.x` based on the `7.0.x`
branch with a cherry-pick of the PR's merge commit, and create a new PR
for it against the `7.0.x` branch.
It is very simplistic, for instance it doesn't handle cherry-pick
failure gracefully, doesn't validate the state of the PR, doesn't check
if the branch already exists, etc. But we can improve on it later as
needed.
Finally, PRs created by github actions do not themselves trigger further
actions, i.e. the PR isn't checked. You need to close & reopen the PR
for the checks to trigger. There are workarounds for this but they are
either less secure or require more setup.
2021-12-12 01:12:35 +02:00
Ran Benita
dd609e150b
Merge pull request #9264 from bluetech/no-pycollector
...
Make PyCollector an implementation detail - don't use in hook type annotation
2021-12-11 22:57:49 +02:00
Ran Benita
0c8a54ab77
Merge pull request #9310 from bluetech/test-main-same-mod
...
testing/test_session: add a regression test for an old bug
2021-12-11 22:26:28 +02:00
Ran Benita
c7be96dae4
Merge pull request #9392 from bluetech/rm-7-deprecated
...
Remove deprecations scheduled for removal in pytest 7.1
2021-12-08 22:59:42 +02:00
Ran Benita
ee93557ef3
Remove PytestRemovedIn7Warning
...
Fix #8838 .
2021-12-08 15:58:08 +02:00
Ran Benita
e05e696fda
Make PyCollector an implementation detail - don't use in hook type annotation
...
The `pytest_pycollector_makeitem` argument `collector` is currently
annotated with type `PyCollector`. As part of #7469 , that would have
required us to expose it in the public API. But really it's an
implementation detail, not something we want to expose. So replace the
annotation with the concrete python collector types that are passed.
Strictly speaking, `pytest_pycollector_makeitem` is called from
`PyCollector.collect()`, so the new type annotation is incorrect if
another type subclasses `PyCollector`. But the set of python collectors
is closed (mapping to language constructs), and the type is private, so
there shouldn't be any other deriving classes, and we can consider it
effectively sealed (unfortunately Python does not provide a way to
express this - yet?).
2021-12-08 15:20:23 +02:00
Anthony Sottile
7ae23ff8ae
fix python version in changelog message ( #9390 )
2021-12-08 10:46:55 +01:00
Bruno Oliveira
3ba9c01f9b
Hide internal stack when using pytest.approx() in bool context ( #9394 )
...
This makes the error traceback point directly to the offending usage, rather
than to the internal `Approx.__bool__` method.
2021-12-08 10:46:44 +01:00
Ran Benita
0f39f11d88
Remove deprecated pytest.collect module
2021-12-07 22:27:35 +02:00
Ran Benita
4a45a5e983
Remove deprecated -k foobar: syntax
2021-12-07 22:27:35 +02:00
Ran Benita
927d9d274f
Remove deprecated -k -foobar syntax
2021-12-07 22:27:35 +02:00
Ran Benita
41d8fb09ca
Remove deprecated pytest_warning_captured hook
2021-12-07 22:27:35 +02:00
Ran Benita
0b0e2d2dbb
Remove deprecated _fillfuncargs function
2021-12-07 22:27:35 +02:00
Ran Benita
4d7a962ca0
Merge pull request #9389 from merwok/patch-1
...
fix markup typo that breaks rendering
2021-12-07 18:35:42 +02:00
Éric
b691d31897
fix typo
2021-12-07 18:16:59 +02:00
Ran Benita
d4120738b5
Merge pull request #9387 from pytest-dev/releasing-prerelease-tag
...
RELEASING: should also tag dev0 for prereleases
2021-12-07 17:16:16 +02:00
Ran Benita
49278c1df8
RELEASING: should also tag dev0 for prereleases
2021-12-07 15:04:27 +02:00
Florian Bruhin
21a186bbda
scripts: Use release branch for changelog URL ( #9380 )
...
* scripts: Use release branch for changelog URL
With a prerelease, /stable won't show the correct changelog.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-12-07 10:24:57 +00:00
Florian Bruhin
5cb50fa13c
Fix changelog URL in 7.0.0rc1 announcement ( #9379 )
...
The changelog does not exist at /stable because an rc isn't stable...
2021-12-07 10:04:55 +00:00
Yuval Shimon
dc7091502d
Fixed error message prints function decorators when using assert in Python 3.9 and above. ( #9359 )
2021-12-07 11:31:03 +02:00
Ran Benita
ef76c28ea2
Merge pull request #9374 from pytest-dev/pre-commit-ci-update-config
...
[pre-commit.ci] pre-commit autoupdate
2021-12-07 11:20:28 +02:00
Florian Bruhin
0ad452bcba
Prepare release version 7.0.0rc1 ( #9375 ) ( #9377 )
...
Co-authored-by: pytest bot <pytestbot@gmail.com >
(cherry picked from commit 85897eddc6 )
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-07 10:13:36 +01:00
pre-commit-ci[bot]
dd53cc7e38
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2021-12-06 21:12:33 +00:00
pre-commit-ci[bot]
d7e7c32a5f
[pre-commit.ci] pre-commit autoupdate
...
updates:
- [github.com/psf/black: 21.11b1 → 21.12b0](https://github.com/psf/black/compare/21.11b1...21.12b0 )
2021-12-06 21:10:55 +00:00
Ran Benita
43213add57
testing/test_session: add a regression test for an old bug
...
Nothing tests this currently. Make sure it doesn't regress if/when the
complex code in `Session.collect` is cleaned up.
2021-11-15 23:22:54 +02:00