Commit Graph

14691 Commits

Author SHA1 Message Date
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 3739e6cd4830cf707dff3fb5c5b93d7a2cec3663)
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