Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
|
|
|
|
DOC: Mark pytest module
|
|
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` ``.
|
|
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).
|
|
Co-authored-by: Florian Bruhin <me@the-compiler.org>
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
|
|
* [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>
|
|
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.
|
|
The type cannot be constructed directly, but is exported for use in type
annotations, since it is reachable through existing public API.
|
|
Support was added in pytest-pygments 2.2.0.
This reverts commit 0feeddf8edb87052402fafe690d019e3eb75dfa4.
|
|
The type cannot be constructed directly, but is exported for use in type
annotations, since it is reachable through existing public API.
|
|
The type cannot be constructed directly, but is exported for use in type
annotations, since it is reachable through existing public API.
|
|
The type cannot be constructed directly, but is exported for use in type
annotations, since it is reachable through existing public API.
|
|
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Co-authored-by: Ran Benita <ran@unusedvar.com>
|
|
|
|
Prepare release 6.2.1
(cherry picked from commit a566eb9c7085d7732127420bd7ce5ec1f7319fba)
|
|
Prepare release 6.2.0
(cherry picked from commit c475106f12ed87fe908544ff383c5205638c086d)
|
|
pytest-pygments doesn't yet recognize the skip reason in summary line
added recently. Workaround it until we get to updating it.
|
|
List pytest-doctestplus in doctest docs
|
|
Add unraisableexception and threadexception plugins
|
|
Export types of builtin fixtures for type annotations
|
|
As per https://github.com/pytest-dev/pytest/discussions/8088
|
|
* 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>
|
|
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
|
|
|
|
|
|
|
|
Follow-up to #8048 which seems to have been merged without the suggested changes.
|
|
The section currently features the nose2pytest tool with plans to expand
on some of the common gotchas when performing such migrations.
|
|
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.
|
|
Fixes #8023.
|
|
Export MonkeyPatch as pytest.MonkeyPatch
|
|
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.
|
|
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
|
|
|
|
|
|
Fix #7530
|
|
Add FunctionDefinition to the reference docs
|
|
Fix #7968
|
|
Fix #7967
|
|
Merge pull request #7958 from pytest-dev/release-6.1.2
|
|
Prepare release 6.1.2
(cherry picked from commit 1ed903e8fcbe60f8ce25b8911641059cd89d892b)
|
|
|
|
The "os" imports in the `tmp_path` and `tmpdir` fixture examples are
unused and thus have been removed to prevent confusion.
|
|
Co-authored-by: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
|
|
|
|
|
|
Fix typos
|