summaryrefslogtreecommitdiff
path: root/doc
AgeCommit message (Collapse)Author
2021-01-19Fix pep8 import order in docs (#8253)Jeff Widman
2021-01-15Deprecate raising unittest.SkipTest to skip tests during collectionRan Benita
It is not very clear why this code exists -- we are not running any unittest or nose code during collection, and really these frameworks don't have the concept of collection at all, and just raising these exceptions at e.g. the module level would cause an error. So unless I'm missing something, I don't think anyone is using this. Deprecate it so we can eventually clear up this code and keep unittest more tightly restricted to its plugin.
2021-01-08Add missing import into example script in documentationGergely Imreh
2021-01-05doc: Add note about training early bird discountFlorian Bruhin
2021-01-05Merge pull request #8220 from xuhdev/module-docBruno Oliveira
DOC: Mark pytest module
2021-01-02DOC: Mark pytest moduleHong Xu
Pytest document currently does not index the top-level package name `pytest`, which causes some trouble when building documentation that cross-refers to the pytest package via ``:mod:`pytest` ``.
2021-01-01DOC: Update multiple references to testdir to pytesterHong Xu
In https://docs.pytest.org/en/stable/reference.html#testdir, it is suggested: > New code should avoid using testdir in favor of pytester. Multiple spots in the documents still use testdir and they can be quite confusing (especially the plugin writing guide).
2020-12-31Add missing fixture (#8207)mefmund
Co-authored-by: Florian Bruhin <me@the-compiler.org> Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-12-30[pre-commit.ci] pre-commit autoupdate (#8201)pre-commit-ci[bot]
* [pre-commit.ci] pre-commit autoupdate * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * manual fixes after configuration update * [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: Anthony Sottile <asottile@umich.edu>
2020-12-26runner: export pytest.CallInfo for typing purposesRan Benita
The type cannot be constructed directly, but is exported for use in type annotations, since it is reachable through existing public API. This also documents `from_call` as public, because at least pytest-forked uses it, so we must treat it as public already anyway.
2020-12-26python: export pytest.Metafunc for typing purposesRan Benita
The type cannot be constructed directly, but is exported for use in type annotations, since it is reachable through existing public API.
2020-12-22Revert "doc: temporary workaround for pytest-pygments lexing error"Ran Benita
Support was added in pytest-pygments 2.2.0. This reverts commit 0feeddf8edb87052402fafe690d019e3eb75dfa4.
2020-12-20mark: export pytest.MarkGenerator for typing purposesRan Benita
The type cannot be constructed directly, but is exported for use in type annotations, since it is reachable through existing public API.
2020-12-20mark: export pytest.MarkDecorator for typing purposesRan Benita
The type cannot be constructed directly, but is exported for use in type annotations, since it is reachable through existing public API.
2020-12-20mark: export pytest.Mark for typing purposesRan Benita
The type cannot be constructed directly, but is exported for use in type annotations, since it is reachable through existing public API.
2020-12-16Clarify fixture execution order and provide visual aids (#7381)Chris NeJame
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com> Co-authored-by: Ran Benita <ran@unusedvar.com>
2020-12-16Use transparent PNG for logo (#8159)Bruno Oliveira
2020-12-15Merge pull request #8149 from pytest-dev/release-6.2.1Bruno Oliveira
Prepare release 6.2.1 (cherry picked from commit a566eb9c7085d7732127420bd7ce5ec1f7319fba)
2020-12-12Merge pull request #8130 from pytest-dev/release-6.2.0Ran Benita
Prepare release 6.2.0 (cherry picked from commit c475106f12ed87fe908544ff383c5205638c086d)
2020-12-12doc: temporary workaround for pytest-pygments lexing errorRan Benita
pytest-pygments doesn't yet recognize the skip reason in summary line added recently. Workaround it until we get to updating it.
2020-12-05Merge pull request #8100 from nicoddemus/doctest-alternativesBruno Oliveira
List pytest-doctestplus in doctest docs
2020-12-05Merge pull request #8055 from bluetech/unraisableRan Benita
Add unraisableexception and threadexception plugins
2020-12-05Merge pull request #8017 from bluetech/typing-public-fixturesRan Benita
Export types of builtin fixtures for type annotations
2020-12-04List pytest-doctestplus in doctest docsBruno Oliveira
As per https://github.com/pytest-dev/pytest/discussions/8088
2020-11-30Custom multiple marker execution order (#8065)Shubham Adep
* Custom multiple marker execution order https://github.com/pytest-dev/pytest/issues/8020 issue stated that ordering of multiple custom markers is from inside - out. I have added example for the same in the documentation. Please let me know for further changes / concerns. * remove trailing spaces The last commit was failing due to extra spaces * Ran tox tests locally to debug white space trimming issues * Resolve: ERROR: docs: commands failed for tox -e docs * Update doc/en/reference.rst Committed PR suggestions. Co-authored-by: Florian Bruhin <me@the-compiler.org> * Added reference to Node.iter_markers_with_node in documentation * Add myself to Authors Co-authored-by: Shubham <shubham.adep@wsu.edu> Co-authored-by: Florian Bruhin <me@the-compiler.org>
2020-11-28Add more info about skipping doctests (#8080)Prakhar Gurunani
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-11-21Add unraisableexception and threadexception pluginsRan Benita
2020-11-21Add str() support to LineMatcher (#8050)Maximilian Cosmo Sitter
2020-11-19Link mentioned functions instead of using literals (#8045)Tim Hoffmann
2020-11-19Fix nose documentationFlorian Bruhin
Follow-up to #8048 which seems to have been merged without the suggested changes.
2020-11-19Add small section on migrating from nose to pytestmickeypash
The section currently features the nose2pytest tool with plans to expand on some of the common gotchas when performing such migrations.
2020-11-13Export types of builtin fixture for type annotationsRan Benita
In order to allow users to type annotate fixtures they request, the types need to be imported from the `pytest` namespace. They are/were always available to import from the `_pytest` namespace, but that is not guaranteed to be stable. These types are only exported for the purpose of typing. Specifically, the following are *not* public: - Construction (`__init__`) - Subclassing - staticmethods and classmethods We try to combat them being used anyway by: - Marking the classes as `@final` when possible (already done). - Not documenting private stuff in the API Reference. - Using `_`-prefixed names or marking as `:meta private:` for private stuff. - Adding a keyword-only `_ispytest=False` to private constructors, warning if False, and changing pytest itself to pass True. In the future it will (hopefully) become a hard error. Hopefully that will be enough.
2020-11-11Add 'node_modules' to norecursedirsAdam Johnson
Fixes #8023.
2020-11-09Merge pull request #8006 from bluetech/export-MonkeyPatchRan Benita
Export MonkeyPatch as pytest.MonkeyPatch
2020-11-09Export MonkeyPatch as pytest.MonkeyPatchRan Benita
We want to export `pytest.MonkeyPatch` for the purpose of type-annotating the `monkeypatch` fixture. For other fixtures we export in this way, we also make direct construction of them (e.g. `MonkeyPatch()`) private. But unlike the others, `MonkeyPatch` is also widely used directly already, mostly because the `monkeypatch` fixture only works in `function` scope (issue #363), but also in other cases. So making it private will be annoying and we don't offer a decent replacement yet. So, let's just make direct construction public & documented.
2020-11-08Improve summary stats when using '--collect-only' (#7875)Hugo Martins
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-11-07Capitalize headlines (#8008)frankgerhardt
2020-11-07fixtures: deprecate pytest.yield_fixture()Ran Benita
2020-11-06Deprecate --strict (#7985)Bruno Oliveira
Fix #7530
2020-10-31Merge pull request #7979 from nicoddemus/metafunc-refBruno Oliveira
Add FunctionDefinition to the reference docs
2020-10-31Add FunctionDefinition to the reference docsBruno Oliveira
Fix #7968
2020-10-31Manually add the remaining 4.6.x release notes to the changelogBruno Oliveira
Fix #7967
2020-10-28Merge pull request #7960 from nicoddemus/cherry-pick-releaseBruno Oliveira
Merge pull request #7958 from pytest-dev/release-6.1.2
2020-10-28Merge pull request #7958 from pytest-dev/release-6.1.2Bruno Oliveira
Prepare release 6.1.2 (cherry picked from commit 1ed903e8fcbe60f8ce25b8911641059cd89d892b)
2020-10-26Update doctest.rstGustavo Camargo
2020-10-23doc: Remove unused imports in examples (#7924)Emiel van de Laar
The "os" imports in the `tmp_path` and `tmpdir` fixture examples are unused and thus have been removed to prevent confusion.
2020-10-22Fix small typo in reference.rst (#7922)Matthias Gabriel
Co-authored-by: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
2020-10-19Drop support for EOL Python 3.5Hugo van Kemenade
2020-10-17Fix lintingBruno Oliveira
2020-10-17Merge pull request #7903 from ekrecker/patch-1Bruno Oliveira
Fix typos