Commit Graph

15372 Commits

Author SHA1 Message Date
Bruno Oliveira c7e9b22f37
Merge pull request #11546 from pytest-dev/release-7.4.3 (#11549)
Prepare release 7.4.3

(cherry picked from commit 53df6164b44269f85334eace9c473c3f3a04aae7)
2023-10-24 16:50:13 -03:00
Benjamin Schubert fbe3e29a55
Color the full diff that pytest shows as a diff (#11530)
Related to #11520
2023-10-24 08:42:21 -03:00
pre-commit-ci[bot] 667b9fd7fd
[pre-commit.ci] pre-commit autoupdate (#11543)
updates:
- [github.com/psf/black: 23.9.1 → 23.10.1](https://github.com/psf/black/compare/23.9.1...23.10.1)
- [github.com/pre-commit/mirrors-mypy: v1.6.0 → v1.6.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.6.0...v1.6.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-10-24 03:42:43 +02:00
Carsten Grohmann 38f7c1e346
Use pytestconfig instead of request.config in cache example (#11542)
to be consistent with the API documentation.
2023-10-23 15:45:16 -03:00
Bruno Oliveira bcd9664370
Merge pull request #11531 from nicoddemus/ensure-logging-cleanup
Ensure logging tests always cleanup after themselves
2023-10-23 10:55:18 -03:00
Bruno Oliveira 7e69ce7449 Add full type annotations to logging/test_fixture.py 2023-10-23 10:46:55 -03:00
Bruno Oliveira 395bbae8a2 Ensure logging tests always cleanup after themselves
Logging has many global states, and we did foresee this by creating a ``cleanup_disabled_logging`` fixture,
however one might still forget to use it and failures leak later -- sometimes not even in the same PR, because the order
of the tests might change in the future, specially when running under xdist.

This problem surfaced during pytest-dev/pytest#11530, where tests unrelated to the change started to fail.
2023-10-23 10:46:55 -03:00
Bruno Oliveira ee53433542
Configure ReadTheDocs to fail on warnings (#11535)
* Configure ReadTheDocs to fail on warnings

Important to catch broken links and references.

* Remove dead link to distutils configuration docs
2023-10-23 09:56:33 -03:00
dependabot[bot] 304ab8495e
build(deps): Bump pytest-mock in /testing/plugins_integration (#11539)
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from 3.11.1 to 3.12.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.11.1...v3.12.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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-23 09:01:08 -03:00
pre-commit-ci[bot] 40e9abd66b
[pre-commit.ci] pre-commit autoupdate (#11510)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/mirrors-mypy: v1.5.1 → v1.6.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.5.1...v1.6.0)

* Ignore two typing errors after updating to mypy 1.6.0

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
2023-10-23 08:05:40 -03:00
github-actions[bot] cac1eed0ea
[automated] Update plugin list (#11534)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-10-21 23:43:14 -03:00
dependabot[bot] cdddd6d695
build(deps): Bump pytest-bdd in /testing/plugins_integration (#11506)
Bumps [pytest-bdd](https://github.com/pytest-dev/pytest-bdd) from 6.1.1 to 7.0.0.
- [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/6.1.1...7.0.0)

---
updated-dependencies:
- dependency-name: pytest-bdd
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-16 08:08:50 -03:00
github-actions[bot] dd68f9c95a
[automated] Update plugin list (#11504)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-10-15 10:03:38 -03:00
ryanpudd 3ab70cd561
Use hyphenated cmdline options in docs (#11490)
Fix #11091
2023-10-10 21:16:24 +00:00
dependabot[bot] 23825f2983
build(deps): Bump django in /testing/plugins_integration (#11491)
Bumps [django](https://github.com/django/django) from 4.2.5 to 4.2.6.
- [Commits](https://github.com/django/django/compare/4.2.5...4.2.6)

---
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>
2023-10-10 17:50:54 -03:00
pre-commit-ci[bot] fb3a46dd8a
[pre-commit.ci] pre-commit autoupdate (#11492)
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v4.5.0)
- [github.com/asottile/pyupgrade: v3.14.0 → v3.15.0](https://github.com/asottile/pyupgrade/compare/v3.14.0...v3.15.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-10-10 06:33:25 +02:00
Zac Hatfield-Dodds 3d6d93d0c2
Merge pull request #11486 from pytest-dev/RonnyPfannschmidt-contributing-tags 2023-10-09 11:29:49 -07:00
github-actions[bot] 2401d76655
[automated] Update plugin list (#11487)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-10-09 08:32:49 -03:00
Tanya Agarwal af9b1dcc24
Duplicated parameters in parametrize marker (#11489)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
2023-10-08 10:26:31 -07:00
Ronny Pfannschmidt 696859fc43
Update CONTRIBUTING.rst
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2023-10-07 16:16:18 +02:00
Ronny Pfannschmidt e966dcd93c
Update CONTRIBUTING.rst to mention tag fetches
closes #11485
2023-10-07 15:54:45 +02:00
pre-commit-ci[bot] 54623f0f33
[pre-commit.ci] pre-commit autoupdate (#11478)
updates:
- [github.com/asottile/reorder-python-imports: v3.11.0 → v3.12.0](https://github.com/asottile/reorder-python-imports/compare/v3.11.0...v3.12.0)
- [github.com/asottile/pyupgrade: v3.13.0 → v3.14.0](https://github.com/asottile/pyupgrade/compare/v3.13.0...v3.14.0)
- [github.com/asottile/setup-cfg-fmt: v2.4.0 → v2.5.0](https://github.com/asottile/setup-cfg-fmt/compare/v2.4.0...v2.5.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-10-03 11:47:19 +00:00
Reagan Lee 9bbfe995ee
Add more comprehensive set assertion rewrites (#11469)
Fixes #10617
2023-10-02 18:37:52 -03:00
github-actions[bot] d015bc1b8f
[automated] Update plugin list (#11472)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-10-02 08:39:53 -03:00
pre-commit-ci[bot] b73b4c464c
[pre-commit.ci] pre-commit autoupdate (#11468)
updates:
- [github.com/asottile/pyupgrade: v3.11.0 → v3.13.0](https://github.com/asottile/pyupgrade/compare/v3.11.0...v3.13.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-09-26 09:31:39 +00:00
Ran Benita 1a16bac131
Merge pull request #11315 from bluetech/pytest-monkeypatch-chdir
pytester: use `monkeypatch.chdir()` for dir changing
2023-09-25 12:10:14 +03:00
Ran Benita 81192ca85f pytester: use monkeypatch.chdir() for dir changing
The current method as the following problem, described by Sadra
Barikbin:

The tests that request both `pytester` and `monkeypatch` and use
`monkeypatch.chdir` without context, relying on `monkeypatch`'s teardown
to restore cwd. This doesn't work because the following sequence of
actions take place:

- `monkeypatch` is set up.
- `pytester` is set up. It saves the original cwd and changes it to a
  new one dedicated to the test function.
- Test function calls `monkeypatch.chdir()` without context.
  `monkeypatch` saves cwd, which is not the original one, before
  changing it.
- `pytester` is torn down. It restores the cwd to the original one.
- `monkeypatch` is torn down. It restores cwd to what it has saved.

The solution here is to have pytester use `monkeypatch.chdir()` itself,
then everything is handled correctly.
2023-09-25 11:31:09 +03:00
Ran Benita 486a9ed057
Merge pull request #11464 from pytest-dev/update-plugin-list/patch-d2b214220
[automated] Update plugin list
2023-09-24 16:03:45 +03:00
Ran Benita 4ae102c003
Merge pull request #11446 from bluetech/pluggy-typing
Improve pluggy-related typing
2023-09-24 15:42:58 +03:00
pytest bot c614590ec9 [automated] Update plugin list 2023-09-24 00:18:30 +00:00
Warren Markham d2b214220f
Add class docstring to NodeMeta (#11427) 2023-09-20 09:08:07 -03:00
Simon Blanchard a38ad254ef
Handle ValueError raised during faulthandler teardown code (#11453)
Fixes #11439
2023-09-20 09:06:43 -03:00
pre-commit-ci[bot] 9f22d3281c
[pre-commit.ci] pre-commit autoupdate (#11451)
updates:
- [github.com/asottile/reorder-python-imports: v3.10.0 → v3.11.0](https://github.com/asottile/reorder-python-imports/compare/v3.10.0...v3.11.0)
- [github.com/asottile/pyupgrade: v3.10.1 → v3.11.0](https://github.com/asottile/pyupgrade/compare/v3.10.1...v3.11.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-09-19 11:51:41 +02:00
Sharad Nair 9a58e6283d
Fixes issue #11314 - log_file_format does not default to log_format (#11444)
* Fixes issue #11314 -

* Incorporated review comments for issue #11314

* Update changelog/11314.improvement.rst

Co-authored-by: Bruno Oliveira <bruno@soliv.dev>

---------

Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
2023-09-18 16:50:04 +00:00
github-actions[bot] 8bac8d7807
[automated] Update plugin list (#11443)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-09-18 13:20:47 -03:00
dependabot[bot] 5e081162df
build(deps): Bump pytest-html in /testing/plugins_integration (#11449)
Bumps [pytest-html](https://github.com/pytest-dev/pytest-html) from 4.0.1 to 4.0.2.
- [Release notes](https://github.com/pytest-dev/pytest-html/releases)
- [Changelog](https://github.com/pytest-dev/pytest-html/blob/master/docs/changelog.rst)
- [Commits](https://github.com/pytest-dev/pytest-html/compare/4.0.1...4.0.2)

---
updated-dependencies:
- dependency-name: pytest-html
  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>
2023-09-18 11:10:48 -03:00
Chris Mahoney 8062743f6b
Change deprecated_call to handle FutureWarning (#11448)
Fixes #11447
2023-09-18 09:34:05 -03:00
Zac Hatfield-Dodds 8b7f94f145
Merge pull request #11424 from lanzz/exceptioninfo-groupcontains 2023-09-17 16:51:57 -07:00
Mihail Milushev 5ace48ca5b Fix a minor mistake in docs ("``match`` method" is actually talking about the `match` keyword parameter) 2023-09-17 22:28:32 +01:00
Mihail Milushev e7caaa0b3e Document the new `ExceptionInfo.group_contains()` method 2023-09-17 22:28:32 +01:00
Mihail Milushev a47fcb4873 code review: kwarg-only `match`, replace `recursive` with `depth` 2023-09-17 22:28:32 +01:00
Mihail Milushev ab8f5ce7f4 Add new `ExceptionInfo.group_contains` assertion helper method
Tests if a captured exception group contains an expected exception.
Will raise `AssertionError` if the wrapped exception is not an exception group.
Supports recursive search into nested exception groups.
2023-09-17 22:28:32 +01:00
Ran Benita f43a8db618 Improve pluggy-related typing 2023-09-17 21:32:55 +03:00
pomponchik 6c2feb75d2
Add flask_fixture to the manual plugin list
Fixes #11435
2023-09-12 19:17:20 -03:00
pre-commit-ci[bot] fcb8e73288
[pre-commit.ci] pre-commit autoupdate (#11434)
updates:
- [github.com/psf/black: 23.7.0 → 23.9.1](https://github.com/psf/black/compare/23.7.0...23.9.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-09-12 08:37:19 -03:00
Bruno Oliveira 241f2a890e
Force terminal width when running tests (#11425)
Related to #11423
2023-09-11 09:22:56 -03:00
dependabot[bot] 39f9306357
build(deps): Bump pytest-html in /testing/plugins_integration (#11431)
Bumps [pytest-html](https://github.com/pytest-dev/pytest-html) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/pytest-dev/pytest-html/releases)
- [Changelog](https://github.com/pytest-dev/pytest-html/blob/master/docs/changelog.rst)
- [Commits](https://github.com/pytest-dev/pytest-html/compare/4.0.0...4.0.1)

---
updated-dependencies:
- dependency-name: pytest-html
  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>
2023-09-11 06:50:46 -03:00
dependabot[bot] e0d04bdfab
build(deps): Bump django in /testing/plugins_integration (#11430)
Bumps [django](https://github.com/django/django) from 4.2.4 to 4.2.5.
- [Commits](https://github.com/django/django/compare/4.2.4...4.2.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>
2023-09-11 06:50:32 -03:00
dependabot[bot] 1949b09fd3
build(deps): Bump actions/checkout from 3 to 4 (#11429)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 06:50:08 -03:00
Ran Benita 3d1c52f203
Merge pull request #11428 from ShurikMen/fix_tests_signature
Fix invalid signature in TestSorting tests
2023-09-11 10:30:45 +03:00