Commit Graph

13487 Commits

Author SHA1 Message Date
Matthew Hughes 709c211e68 Run regendoc over fixture docs
This is the result of running:

    $ cd doc/en && make regen REGENDOC_FILES=fixture.rst
2021-02-04 18:32:52 +00:00
Matthew Hughes 97cfd66806 Add regendoc runs for emaillib tests in fixture
Also update these tests ensure they pass, and be explicit about the test
file called in an existing test to avoid unintentional calls to the
added tests
2021-02-04 18:32:28 +00:00
Bruno Oliveira 287bab09a4
Merge pull request #8314 from pytest-dev/update-plugin-list/patch-275174e
[automated] Update plugin list
2021-02-04 11:54:29 -03:00
Bruno Oliveira 7c622d7462
Merge pull request #8316 from The-Compiler/training-update
doc: Remove past training
2021-02-04 10:02:02 -03:00
Florian Bruhin b77f071bef doc: Remove past training 2021-02-04 11:40:28 +01:00
Ran Benita 3907856cb3
Merge pull request #8297 from pytest-dev/monkeypatch-docs
doc: Point out two-argument form of monkeypatch.setattr
2021-02-04 10:13:27 +02:00
pytest bot 1d895dd46c [automated] Update plugin list 2021-02-04 00:26:06 +00:00
Matthew Hughes 298541f540 Add basic emaillib for tests in fixture.rst
This will be used to power regendoc runs for later tests
2021-02-03 13:14:31 +00:00
Matthew Hughes 100c8deab5 Fix various typos in fixture docs 2021-02-03 13:14:31 +00:00
Bruno Oliveira 275174e147
Merge pull request #8308 from pytest-dev/update-plugin-list/patch-c26dddc
[automated] Update plugin list
2021-02-02 09:05:04 -03:00
Bruno Oliveira 3568df22b0
Merge pull request #8302 from pytest-dev/update-plugin-list/patch-ed8f424
[automated] Update plugin list
2021-02-02 08:43:51 -03:00
pytest bot 3165b1e323 [automated] Update plugin list 2021-02-02 00:31:11 +00:00
Bruno Oliveira c26dddc651
Merge pull request #8306 from pytest-dev/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-02-01 17:37:14 -03:00
pre-commit-ci[bot] 1b2ca22e9b
[pre-commit.ci] pre-commit autoupdate 2021-02-01 16:49:41 +00:00
pytest bot 5c61d60b0d [automated] Update plugin list 2021-02-01 00:32:44 +00:00
Ran Benita ed8f424bcb
Merge pull request #8299 from pytest-dev/update-plugin-list/patch-38a3e30
[automated] Update plugin list
2021-01-30 15:13:22 +02:00
Ran Benita c971f2f474 ci: give pytest bot the credit for updating the plugin list 2021-01-30 13:04:10 +02:00
bluetech de06f468ed [automated] Update plugin list 2021-01-30 00:30:28 +00:00
Florian Bruhin f0f19aa8d9
doc: Point out two-argument form of monkeypatch.setattr
See the "for convenience" part here: https://docs.pytest.org/en/stable/reference.html#pytest.MonkeyPatch.setattr
2021-01-29 21:08:37 +01:00
Bruno Oliveira 38a3e30cd9
Merge pull request #8296 from bluetech/mypy-800-ignores
Remove some no longer needed type-ignores
2021-01-29 16:35:33 -03:00
Ran Benita afea190797 Remove some no longer needed type-ignores 2021-01-29 20:40:43 +02:00
Hong Xu 07f0eb26b4
Doc: Clarify pytester.run (#8294)
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2021-01-29 12:54:06 -03:00
Ran Benita 63ea727bc2
changelog: fix missing tick (#8295)
Messes with the rendering.
2021-01-29 16:21:25 +02:00
Maximilian Cosmo Sitter beda7a8a31
Add plugin list 2021-01-29 16:19:54 +02:00
Ran Benita 0b510bcc51
changelog: fix missing tick
Messes with the rendering.
2021-01-29 16:06:36 +02:00
Bruno Oliveira 6a5d47a243
Merge pull request #8260 from nicoddemus/faulthandler-mode-X-8258 2021-01-28 13:03:24 -03:00
Bruno Oliveira 7b4ee65bdc
Merge pull request #8284 from encukou/patch-1
Doc: Fix typo
2021-01-27 09:40:55 -03:00
Bruno Oliveira 0365b1be64
Merge pull request #8280 from xuhdev/module
Doc: Move the module declaration to index.rst
2021-01-27 09:05:36 -03:00
Petr Viktorin 56cea26445
Doc: Fix typo 2021-01-27 10:23:18 +01:00
Ran Benita 0939c3e022
Merge pull request #8279 from pytest-dev/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-01-26 11:17:58 +02:00
Hong Xu 8bb3977cb6 Doc: Move the module declaration to index.rst
When the declaration stays in reference.rst, it creates duplicated
"pytest" symbols such as `pytest.pytest.mark.filterwarnings`.
2021-01-26 00:48:01 -08:00
Bruno Oliveira dfe933cdb4 Remove mypy workaround after 0.800 update 2021-01-25 15:23:13 -03:00
pre-commit-ci[bot] 6806091b93
[pre-commit.ci] pre-commit autoupdate 2021-01-25 16:41:17 +00:00
Bruno Oliveira 33861098d9 Only re-enable fauthandler during unconfigure if it was enabled before 2021-01-25 12:28:00 -03:00
Christian Steinmeyer 781b73bb52
Mention that class variables are shared between tests
Close #8252
2021-01-25 12:02:59 -03:00
Bruno Oliveira f3efc4e049
Merge pull request #8277 from nicoddemus/cherry-pick-release
Merge pull request #8275 from pytest-dev/release-6.2.2
2021-01-25 12:02:49 -03:00
Bruno Oliveira 2a890286f8 Merge pull request #8275 from pytest-dev/release-6.2.2
Prepare release 6.2.2

(cherry picked from commit 8220eca963472e7918ef7e108bdc1cd8ed155a4a)
2021-01-25 11:53:05 -03:00
Ran Benita fff9f28fdd
Merge pull request #8272 from bluetech/setupstate-refactor-2
runner: avoid using node's store in SetupState
2021-01-25 16:00:05 +02:00
Bruno Oliveira 5cc295e74b
Merge pull request #8273 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-cov-2.11.1
build(deps): bump pytest-cov from 2.10.1 to 2.11.1 in /testing/plugins_integration
2021-01-25 09:12:14 -03:00
dependabot[bot] 83ee1a1f3b
build(deps): bump pytest-cov in /testing/plugins_integration
Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 2.10.1 to 2.11.1.
- [Release notes](https://github.com/pytest-dev/pytest-cov/releases)
- [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-cov/compare/v2.10.1...v2.11.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-25 03:16:50 +00:00
Ran Benita 48fb989a71 runner: avoid using node's store in SetupState
SetupState maintains its own state, so it can store the exception
itself, instead of using the node's store, which is better avoided when
possible.

This also reduces the lifetime of the reference-cycle-inducing exception
objects which is never a bad thing.
2021-01-24 15:05:03 +02:00
Ran Benita d5df8f99ab
Merge pull request #8219 from bluetech/setupstate-refactor
runner: refactor SetupState
2021-01-24 14:51:58 +02:00
Ran Benita c30feeef8b runner: add docstring to SetupState and improve variable naming a bit 2021-01-24 14:29:54 +02:00
Ran Benita 0d19aff562 runner: schedule node.teardown() call already at setup
This is more elegant.
2021-01-24 14:08:39 +02:00
Ran Benita 1db78bec31 runner: use insertion-ordered dict instead of stack, dict pair
Since dicts are now ordered, we can use the finalizers dict itself as
the dict, simplifying the code.
2021-01-24 14:08:39 +02:00
Ran Benita 03c3a90c68 runner: replace setdefault with an unconditional set
The already-exists case is not supposed to happen.
2021-01-24 14:08:39 +02:00
Ran Benita 960ebae943 runner: enable a commented assertion in SetupState.addfinalizer
The assertion ensures that when `addfinalizer(finalizer, node)` is
called, the node is in the stack. This then would ensure that the
finalization is actually properly executed properly during the node's
teardown. Anything else indicates something is wrong.

Previous commits fixed all of the tests which previously failed this, so
can be reenabeld now.
2021-01-24 14:08:39 +02:00
Ran Benita 6db082a448 fixtures: make sure to properly setup stack for _fill_fixtures_impl
This code is weird, dead, deprecated and will be removed in pytest 7,
but for now some tests execute it, so fix it up in preparation for
some changes.
2021-01-24 14:08:39 +02:00
Ran Benita 637300d13d testing: fix some tests to be more realistic
Perform the operations in the order and context in which they can
legally occur.
2021-01-24 14:08:39 +02:00
Ran Benita c83d030028 testing/test_runner: make SetupState tests use a proper SetupState
Previously the tests (probably unintentionally) mixed a fresh SetupState
and the generated item Session's SetupState, which led to some serious
head scratching when prodding it a bit.
2021-01-24 14:08:39 +02:00