summaryrefslogtreecommitdiff
path: root/testing
AgeCommit message (Collapse)Author
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-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-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-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-01Always use getfixturemarker() to access _pytestfixturefunctionRan Benita
Keep knowledge of how the marker is stored encapsulated in one place.
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: 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-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-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-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-22testing/test_config: check inipath instead of inifileRan Benita
inifile is soft-deprecated in favor of inipath.
2020-12-22testing/test_helpconfig: remove unclear commentRan Benita
2020-12-22code: convert from py.path to pathlibRan Benita
2020-12-22Merge pull request #8179 from bluetech/typing-public-markRan Benita
mark: expose Mark, MarkDecorator, MarkGenerator under pytest for typing purposes
2020-12-21build(deps): bump pytest-mock in /testing/plugins_integrationdependabot[bot]
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from 3.3.1 to 3.4.0. - [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.3.1...v3.4.0) Signed-off-by: dependabot[bot] <support@github.com>
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-19testing/test_nodes: fix fake session to be more accurateRan Benita
The type of _initialpaths is `FrozenSet[Path]`.
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-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-15Merge pull request #8144 from bluetech/py-to-pathlib-4Ran Benita
hookspec: add pathlib.Path alternatives to py.path.local parameters in hooks
2020-12-15tests: Migrate to pytester - incremental update (#8145)Anton
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-14Merge pull request #8139 from ↵Bruno Oliveira
pytest-dev/dependabot/pip/testing/plugins_integration/pytest-html-3.1.1 build(deps): bump pytest-html from 3.1.0 to 3.1.1 in /testing/plugins_integration
2020-12-14build(deps): bump pytest-html in /testing/plugins_integrationdependabot[bot]
Bumps [pytest-html](https://github.com/pytest-dev/pytest-html) from 3.1.0 to 3.1.1. - [Release notes](https://github.com/pytest-dev/pytest-html/releases) - [Changelog](https://github.com/pytest-dev/pytest-html/blob/master/CHANGES.rst) - [Commits](https://github.com/pytest-dev/pytest-html/compare/v3.1.0...v3.1.1) Signed-off-by: dependabot[bot] <support@github.com>
2020-12-14build(deps): bump pytest-bdd in /testing/plugins_integrationdependabot[bot]
Bumps [pytest-bdd](https://github.com/pytest-dev/pytest-bdd) from 4.0.1 to 4.0.2. - [Release notes](https://github.com/pytest-dev/pytest-bdd/releases) - [Changelog](https://github.com/pytest-dev/pytest-bdd/blob/master/CHANGES.rst) - [Commits](https://github.com/pytest-dev/pytest-bdd/compare/4.0.1...4.0.2) Signed-off-by: dependabot[bot] <support@github.com>
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-13migrates test_warnings.py from testdir to pytesterbot2x
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-08Migrate to pytester: test_capture.py, test_terminal.py, approx.py (#8108)Anton
* Migrate to pytester: test_capture.py, test_config.py, approx.py * migrate test_terminal.py * revert test_config.py * more typing in test_terminal.py * try-out 'tr' fixture update * revert 'tr' fixture, update test_config.py