summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-01-18Fix faulthandler for Twisted Logger when used with "--capture=no"Andreas Motl
The Twisted Logger will return an invalid file descriptor since it is not backed by an FD. So, let's also forward this to the same code path as with `pytest-xdist`.
2021-01-15Merge pull request #8241 from bluetech/skip-improvementsRan Benita
Minor code improvements in nose, unittest, skipping
2021-01-14Improve way in which skip location is fixed up when skipped by markRan Benita
When `pytest.skip()` is called inside a test function, the skip location should be reported as the line that made the call, however when `pytest.skip()` is called by the `pytest.mark.skip` and similar mechanisms, the location should be reported at the item's location, because the exact location is some irrelevant internal code. Currently the item-location case is implemented by the caller setting a boolean key on the item's store and the `skipping` plugin checking it and fixing up the location if needed. This is really roundabout IMO and breaks encapsulation. Instead, allow the caller to specify directly on the skip exception whether to use the item's location or not. For now, this is entirely private.
2021-01-14nose: type annotate with some resulting refactoringRan Benita
2021-01-14unittest: add clarifying comment on unittest.SkipTest -> pytest.skip codeRan Benita
I was tempted to remove it, until I figured out why it was there.
2021-01-14nose,fixtures: use the public item API for adding finalizersRan Benita
2021-01-13unittest: cleanup unexpected success handling (#8231)Anton
* unittest: cleanup unexpected success handling * update comment
2021-01-11Merge pull request #8235 from ↵Bruno Oliveira
pytest-dev/dependabot/pip/testing/plugins_integration/django-3.1.5 build(deps): bump django from 3.1.4 to 3.1.5 in /testing/plugins_integration
2021-01-11Merge pull request #8234 from ↵Bruno Oliveira
pytest-dev/dependabot/pip/testing/plugins_integration/pytest-mock-3.5.1 build(deps): bump pytest-mock from 3.4.0 to 3.5.1 in /testing/plugins_integration
2021-01-11build(deps): bump django in /testing/plugins_integrationdependabot[bot]
Bumps [django](https://github.com/django/django) from 3.1.4 to 3.1.5. - [Release notes](https://github.com/django/django/releases) - [Commits](https://github.com/django/django/compare/3.1.4...3.1.5) Signed-off-by: dependabot[bot] <support@github.com>
2021-01-11build(deps): bump pytest-mock in /testing/plugins_integrationdependabot[bot]
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from 3.4.0 to 3.5.1. - [Release notes](https://github.com/pytest-dev/pytest-mock/releases) - [Changelog](https://github.com/pytest-dev/pytest-mock/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest-mock/compare/v3.4.0...v3.5.1) Signed-off-by: dependabot[bot] <support@github.com>
2021-01-08Merge pull request #8232 from imrehg/docRan Benita
Add missing import into example script in documentation
2021-01-08Add missing import into example script in documentationGergely Imreh
2021-01-05Merge pull request #8225 from The-Compiler/training-updateBruno Oliveira
doc: Add note about training early bird discount
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-04Merge pull request #8218 from bluetech/reports2Ran Benita
Misc small code improvements
2021-01-04Add dot prefix if file makefile extension is invalid for pathlib (#8222)bengartner
2021-01-02Merge pull request #8216 from xuhdev/testdir-pytesterRan Benita
DOC: Update multiple references to testdir to pytester
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-01python: inline a simple methodRan Benita
I don't think it adds much value!
2021-01-01Always use getfixturemarker() to access _pytestfixturefunctionRan Benita
Keep knowledge of how the marker is stored encapsulated in one place.
2021-01-01fixtures: type annotate FixtureRequest.keywordsRan Benita
2021-01-01fixtures: simplify FixtureRequest._get_fixturestack()Ran Benita
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).
2021-01-01Merge pull request #8214 from sousajf1/sousajo_patch_8204_1Ran Benita
pytest-dev#8204 migrate tests on testing/code/test_source to tmp_path
2021-01-01pytest-dev#8204 migrate tests on testing/code/test_source to tmp_pathsousajo
2021-01-01pytest-dev#8204 migrate some tests to tmp_path fixture (#8209)sousajf1
migrating some tests from tmpdir to tmp_path fixture
2021-01-01reports: improve a type annotationRan Benita
2021-01-01reports: BaseReport.{passed,failed,skipped} more friendly to mypyRan Benita
Not smart enough to understand the previous code.
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-30Fix failing staticmethod tests if they are inherited (#8205)Anton
* Fix failing staticmethod tests if they are inherited * add comments, set default=None
2020-12-30Merge pull request #8195 from ↵Ran Benita
christophebedard/add-missing-space-version-option-help-message Add missing space in '--version' help message
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-29Merge pull request #8194 from bluetech/typing-public-3Ran Benita
Export pytest.Metafunc and pytest.Callinfo, hide NodeKeywords
2020-12-28Merge pull request #8188 from antonblr/subprocess-coverageRan Benita
coverage: Include code that runs in subprocesses
2020-12-28Add missing space in '--version' help messageChristophe Bedard
2020-12-26coverage: Include code that runs in subprocessesantonblr
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-26nodes: avoid needing to expose NodeKeywords for typingRan Benita
It adds no value over exporting just the ABC so do that to reduce the API surface.
2020-12-26Merge pull request #8174 from bluetech/py-to-pathlib-5Ran Benita
More py.path -> pathlib conversions
2020-12-22Merge pull request #8185 from bluetech/revert-docs-pygments-workaroundBruno Oliveira
Revert "doc: temporary workaround for pytest-pygments lexing error"
2020-12-22Merge pull request #8187 from pytest-dev/asottile-patch-1Bruno Oliveira
Add badge for pre-commit.ci
2020-12-22Add badge for pre-commit.ciAnthony Sottile
See #8186
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-22Convert most of the collection code from py.path to pathlibRan Benita
2020-12-22testing: convert some tmpdir to tmp_pathRan Benita
The tmpdir fixture (and its factory variant) is soft-deprecated in favor of the tmp_path fixture.
2020-12-22pathlib: missing type annotation for fnmatch_exRan Benita
2020-12-22testing/test_config: check inipath instead of inifileRan Benita
inifile is soft-deprecated in favor of inipath.