summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-01-13unittest: cleanup unexpected success handling (#8231)Anton
* unittest: cleanup unexpected success handling * update comment
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-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-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-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-28Add missing space in '--version' help messageChristophe Bedard
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-22Convert most of the collection code from py.path to pathlibRan Benita
2020-12-22pathlib: missing type annotation for fnmatch_exRan Benita
2020-12-22code: convert from py.path to pathlibRan Benita
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-19doctest: use Path instead of py.path where possibleRan Benita
2020-12-19config: let main() accept any os.PathLike instead of just py.path.localRan Benita
Really it ought to only take the List[str], but for backward compatibility, at least get rid of the explicit py.path.local check.
2020-12-19terminal: remove unused union arm in WarningReport.fslocationRan Benita
2020-12-18address commentsantonblr
2020-12-18tests: Migrate to pytester - final updateantonblr
2020-12-15terminal: fix "(<Skipped instance>)" skip reason in test status lineRan Benita
2020-12-15python_api: handle array-like args in approx() (#8137)Jakob van Santen
2020-12-15hookspec: add pathlib.Path alternatives to py.path.local parameters in hooksRan Benita
As part of the ongoing migration for py.path to pathlib, make sure all hooks which take a py.path.local also take an equivalent pathlib.Path.
2020-12-15Some py.path.local -> pathlib.PathRan Benita
2020-12-13tests: Migrate testing/python to pytester fixtureantonblr
2020-12-13Merge pull request #8123 from nicoddemus/import-mismatch-uncBruno Oliveira
Compare also paths on Windows when considering ImportPathMismatchError
2020-12-13Merge pull request #8122 from bluetech/py-to-pathlib-3Ran Benita
Some py.path.local -> pathlib.Path
2020-12-12terminal: when the skip/xfail is empty, don't show it as "()"Ran Benita
Avoid showing a line like x.py::test_4 XPASS () [100%] which looks funny.
2020-12-12Add `pytest_markeval_namespace` hook.Pedro Algarvio
Add a new hook , `pytest_markeval_namespace` which should return a dictionary. This dictionary will be used to augment the "global" variables available to evaluate skipif/xfail/xpass markers. Pseudo example ``conftest.py``: .. code-block:: python def pytest_markeval_namespace(): return {"color": "red"} ``test_func.py``: .. code-block:: python @pytest.mark.skipif("color == 'blue'", reason="Color is not red") def test_func(): assert False
2020-12-12Some py.path.local -> pathlib.PathRan Benita
- Some conftest related functions - _confcutdir - Allow arbitrary os.PathLike[str] in gethookproxy.
2020-12-12Compare also paths on Windows when considering ImportPathMismatchErrorBruno Oliveira
On Windows, os.path.samefile returns false for paths mounted in UNC paths which point to the same location. I couldn't reproduce the actual case reported, but looking at the code it seems this commit should fix the issue. Fix #7678 Fix #8076
2020-12-09Show reason for skipped test in verbose modeKatarzyna
2020-12-05Merge pull request #8038 from matthewhughes934/note-tmpdir-lifetimeRan Benita
Docs: Note lifetime of temporary directories
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-11-28Docs: Note lifetime of temporary directoriesMatthew Hughes
Explanation: The default handling of these lifetimes is done in `tmpdir.TempPathFactory.getbasetemp`, which passes `keep=3` to `pathlib.make_numbered_dir_with_cleanup`. GH Issue: #8036
2020-11-25Merge pull request #8064 from symonk/fix-typo-in-mock-timingRan Benita
fix mock_timing fixture name (typo) in timing.py
2020-11-24fix typo (#8069)Jürgen Gmach
2020-11-23fix mock_timing fixture name (typo) in timing.pySimon K
2020-11-21Add unraisableexception and threadexception pluginsRan Benita
2020-11-21Add str() support to LineMatcher (#8050)Maximilian Cosmo Sitter
2020-11-21permit node to warn with any warning type, not just PytestWarning (#8052)Simon K
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>