Commit Graph

2712 Commits

Author SHA1 Message Date
Florian Bruhin d49f1fc4db
doc: update sprint repo link (#12296) 2024-05-08 10:13:30 -03:00
Bruno Oliveira 84e59af8c8
Document exceptions raised by exit, skip, xfail, fail, and importorskip (#12285)
As commented on: https://github.com/pytest-dev/pytest/issues/7469#issuecomment-2094104215
2024-05-05 22:53:16 +00:00
github-actions[bot] 3d09c85df0
[automated] Update plugin list (#12286)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2024-05-04 21:26:09 -03:00
Pierre Sassoulas 4788165e69 [ruff UP031] Fix to use format specifiers instead of percent format 2024-04-30 18:06:26 +02:00
dj 2ede8778d0
Document using PYTEST_VERSION to detect if a code is running inside pytest (#12153)
Related to #9502
2024-04-28 15:52:29 -03:00
pytest bot 852df0dc3e [automated] Update plugin list 2024-04-28 00:20:56 +00:00
Bruno Oliveira 79ca819e59 Merge pull request #12257 from pytest-dev/release-8.2.0
Prepare release 8.2.0

(cherry picked from commit 69c3bcea36e1cf3468ac3cb92da9cf37038f959d)
2024-04-27 20:36:02 -03:00
Bruno Oliveira 93c2cdf6d6
cherry-pick release-8.1.2 (#12252)
(cherry picked from commit 7df3dbc545b4b4deb2148683cd02f774b2d19fd8)
2024-04-26 15:25:44 -03:00
Shekhar verma 4eb8b6d525
Changed importError to ModuleNotFoundError (#12220)
* Changed importError to ModuleNotFoundError

* added testing for importorskip

* added exc_types parameter in importorskip

* Added warning and Test Cases

* Improve tests and docs

* Improve deprecation docs

* Change exc_type to kw only

* Apply suggestions from code review

Co-authored-by: Florian Bruhin <me@the-compiler.org>

* Fix check

---------

Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2024-04-26 09:48:57 +02:00
Florian Bruhin a830a3e98d
Update events/trainings (#12236) 2024-04-22 19:52:25 +02:00
github-actions[bot] 63d985c6d3
[automated] Update plugin list (#12230)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2024-04-21 10:57:36 -03:00
Ran Benita 58136c5376 hookspec: deprecate hookimpls requesting py.path parameters 2024-04-21 11:37:56 +03:00
dj 48b6d18834
Add PYTEST_VERSION environment variable (#12190)
Among other things, it can be used to check if a code is running from within a pytest session.

Fixes #9502
2024-04-18 07:45:47 -03:00
pytest bot 5f6e825a26 [automated] Update plugin list 2024-04-14 00:21:52 +00:00
Bruno Oliveira 99890636bf
Refine how we detect namespace packages (#12169)
Previously we used a hand crafted approach to detect namespace packages, however we should rely on ``importlib`` to detect them for us.

Fix #12112

---------

Co-authored-by: Ran Benita <ran@unusedvar.com>
2024-04-09 13:21:51 -03:00
github-actions[bot] f75dd87eb7
[automated] Update plugin list (#12193)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2024-04-07 08:57:04 -03:00
Manuel López-Ibáñez cc588d1a1a
Doc: `import pytest` in `conftest.py` example in `doctest.rst` (#12181) 2024-04-03 09:02:09 -03:00
pytest bot 2dd58e827e [automated] Update plugin list 2024-03-31 00:20:45 +00:00
tserg 909759de2d
Improve sentence in marks documentation (#12157) 2024-03-24 15:59:07 +01:00
pytest bot aeae91e27d [automated] Update plugin list 2024-03-24 00:20:37 +00:00
Linghao Zhang c650e3a94f
Add research item in doc (#12147) 2024-03-21 11:21:43 -03:00
pytest bot 2e69f31444 [automated] Update plugin list 2024-03-17 00:20:04 +00:00
Tobias Stoeckmann 2e5da5d2fb
doc: fix typos (#12118)
* doc: add missing word

* doc: fix typos

Typos found with codespell
2024-03-14 16:36:11 +00:00
Ran Benita 0a442a9599
doc/flaky: remove `box/flaky` plugin suggestion (#12100)
The plugin is abandoned and no longer working with new pytest versions.

I also reordered a bit to put pytest-rerunfailures first since it seems most maintained and is under pytest-dev.
2024-03-10 11:51:04 -03:00
github-actions[bot] b777b05c0e
[automated] Update plugin list (#12098)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2024-03-10 09:57:13 -03:00
Bruno Oliveira 140c777590 Merge pull request #12094 from pytest-dev/release-8.1.1
Prepare release 8.1.1

(cherry picked from commit abb0cf4922919e3554bd16e9fc540bc107289ee9)
2024-03-09 08:52:31 -03:00
Levon Saldamli 9033d4d3ff
Parse args from file (#12085)
Co-authored-by: Ran Benita <ran@unusedvar.com>
Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
2024-03-09 08:51:52 +02:00
Bruno Oliveira dacee1f11d Revert "Remove deprecated py.path hook arguments"
This reverts commit a98f02d423.
2024-03-07 19:50:33 -03:00
Bruno Oliveira 303cd0d48a Revert "Remove deprecated py.path (`fspath`) node constructor arguments"
This reverts commit 6c89f9261c.
2024-03-07 19:50:33 -03:00
Bruno Oliveira 6ee02a3e6c Yank version 8.1.0
Related to #12069
2024-03-04 12:18:14 -03:00
Ran Benita e410705561 Cherry-pick 8.1.0 release notes
(cherry picked from commit 0a536810dc5f51dac99bdb90dde06704b5aa034e)
2024-03-03 23:27:02 +02:00
github-actions[bot] 82fe28dae4
[automated] Update plugin list (#12049)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2024-03-03 12:50:42 +00:00
Bruno Oliveira d6134bc21e doc: document consider_namespace_packages option 2024-03-02 16:13:48 -03:00
Bruno Oliveira 5746b8e696 doc: update and improve import mode docs 2024-03-02 16:13:48 -03:00
donghui 4db5e53709
docs: update plugins number 2024-03-01 05:43:57 +08:00
Bruno Oliveira ffd727e9d6 Fix mention of the prefix for pytest plugins in `plugin_list` 2024-02-24 21:35:51 -03:00
pytest bot b6eb985d55 [automated] Update plugin list 2024-02-25 00:19:33 +00:00
Ran Benita 7460b1aa31 Cherry pick 8.0.2 release notes
(cherry picked from commit e53f79893212391c0bada5f1628b977371a09434)
2024-02-25 00:25:49 +02:00
Patrick Lannigan 84bd31de64
New verbosity_test_case ini option (#11653)
Allow for the output of test case execution to be controlled independently from the application verbosity level. 

`verbosity_test_case` is the new ini setting to adjust this functionality.

Fix #11639
2024-02-24 16:27:54 -03:00
Ran Benita 00d9640abc Revert "Fix teardown error reporting when `--maxfail=1` (#11721)"
Fix #12021.
Reopens #11706.

This reverts commit 12b9bd5801.

This change caused a bad regression in pytest-xdist:
https://github.com/pytest-dev/pytest-xdist/issues/1024

pytest-xdist necessarily has special handling of `--maxfail` and session
fixture teardown get executed multiple times with the change.

Since I'm not sure how to adapt pytest-xdist myself, revert for now.

I kept the sticky `shouldstop`/`shouldfail` changes as they are good
ideas regardless I think.
2024-02-23 11:45:26 +02:00
Ben Leith c5c729e27a
Add --log-file-mode option to the logging plugin, enabling appending to log-files (#11979)
Previously, the mode was hard-coded to be "w" which truncates the file before logging.

Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
2024-02-21 12:02:19 +00:00
Bruno Oliveira 40011b838b
Allow Sphinx 7.x (#12002)
Thanks to https://github.com/pytest-dev/pytest/issues/11988#issuecomment-1950318888, the problem was our custom template.

The solution was to copy the template from Sphinx 7 and remove the header.
2024-02-18 07:21:05 -03:00
Bruno Oliveira abf6a60567 Fix 'pytest_' mention: it was being considered a rst reference 2024-02-17 22:21:30 -03:00
pytest bot 52da8dd66c [automated] Update plugin list 2024-02-18 00:19:26 +00:00
Bruno Oliveira cefb3e2277
Disallow Sphinx 6 and 7 (#12000)
Using Sphinx 6.x and 7.x the search bar disappears. Restrict to Sphinx 5.x for now until we find a solution.

Reverts #11568
Fixes #11988
2024-02-17 17:46:58 -03:00
Ran Benita 22b541e4eb Merge pull request #11993 from pytest-dev/release-8.0.1
Prepare release 8.0.1

(cherry picked from commit 68524d48586e7f8d070fc1146e5ff90e770d0382)
2024-02-17 00:11:27 +02:00
Bruno Oliveira acafd003aa
Consider pyproject.toml files for config if no other config files were found (#11962)
Today `pyproject.toml` is the standard for declaring a Python project root, so seems reasonable to consider it for the ini configuration (and specially `rootdir`) in case we do not find other suitable candidates.

Related to #11311
2024-02-14 16:08:45 -03:00
github-actions[bot] 23dfb52974
[automated] Update plugin list (#11964)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2024-02-10 21:50:24 -03:00
Ran Benita a182e10b06 Enable lint PGH004 - Use specific rule codes when using noqa 2024-02-09 11:14:36 +02:00
pytest bot b28bb01c4e [automated] Update plugin list 2024-02-04 00:19:52 +00:00