Commit Graph

129 Commits

Author SHA1 Message Date
jakkdl 5186f3677e
Merge remote-tracking branch 'origin/main' into raisesgroup 2025-03-03 12:28:16 +01:00
Bruno Oliveira 4603564f64 Merge pull request #13264 from pytest-dev/release-8.3.5
Release 8.3.5

(cherry picked from commit f004b11caf)
2025-03-02 10:14:04 -03:00
John Litborn 5bd393cf01
add --disable-plugin-autoload (#13253)
* add --disable-plugin-autoload

* update comments in test, don't check __spec__ on pypy (????), add changelog

* pemdas except not

* Apply suggestions from code review

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

* add parens

* Simplify plugin name in test_installed_plugin_rewrite

* Apply suggestions from code review

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Florian Bruhin <me@the-compiler.org>
Co-authored-by: Bruno Oliveira <bruno@pytest.org>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-03-01 14:27:25 -08:00
Andrew Pikul d3adf46ad7
Add capteesys capture fixture to bubble up output to `--capture` handler (#12854)
The config dict is passed alongside the class that the fixture will eventually initialize. It can use the config dict for optional arguments to the implementation's constructor.
2025-03-01 12:37:16 -03:00
Anton Zhilin 611bb13108
Allow hiding a parameter set from test name (#13229)
Fixes #13228

---------

Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
2025-03-01 10:06:40 -03:00
jakkdl c011e9b6f3 fix test, fix references in docstrings 2025-02-06 17:12:56 +01:00
jakkdl e1e1874cda rename AbstractMatcher -> AbstractRaises, Matcher->RaisesExc. Add docs on RaisesGroup&RaisesExc. Add warnings to group_contains. Remove group_contains example from getting-started page 2025-02-06 15:39:25 +01:00
Emil Hjelm b89c1ce279
Add confval ``console_output_style`` option ``times`` (#13126)
Fixes #13125

---------

Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
2025-01-20 12:27:21 -03:00
Zac Hatfield-Dodds 9d4f36d87d
Merge pull request #12810 from FreerGit/dont-auto-discover-feat
Add `discover_imports` in conf, don't collect imported classes named Test* closes #12749`
2024-12-01 13:13:41 -08:00
Bruno Oliveira e2ec64e037 Improve docs 2024-12-01 09:24:40 -03:00
sven 935c06de09 WIP: don't collect instead of filtering out 2024-11-04 02:02:18 +01:00
Stefaan Lippens a1a491837b
Improve docs on basetemp and retention (#12912)
Improve coverage of current handling of `--basetemp` option and its lack of retention functionality.

Also document `PYTEST_DEBUG_TEMPROOT`.

Related to #10829

---------

Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
2024-10-31 07:28:03 -03:00
jakkdl 29490af255 fix docs 2024-10-25 14:52:34 +02:00
Stefaan Lippens 26a29bdade
Docs: improve/cleanup reference from/to recwarn (#12866)
Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
2024-10-10 07:43:36 -03:00
moajo a14c718867
Fix `disable_test_id_escaping_and_forfeit_all_rights_to_community_support` option when using `pytest.param(..., id="...")`
Fixes #9037

---------

Co-authored-by: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
Co-authored-by: Bruno Oliveira <bruno@pytest.org>
2024-10-09 20:52:26 +00:00
sven eb8592c526 update default and add docs 2024-10-01 18:41:30 +02:00
Sam Bull 2a22a696e7
Remove missing msg parameter from docs 2024-09-21 22:10:33 +01:00
Pavel Zhukov d924a63871
Implement truncation thresholds config options (#12766)
Fixes #12765

Co-authored-by: Bruno Oliveira <bruno@pytest.org>
2024-09-21 10:00:56 -03:00
Eugene Mwangi 49eafce55b
docs: Revise `cache_dir` option section (#12701)
Update the description for the `cache_dir` configuration options section to improve semantics and clarity for an unclear sentence in the file `reference.rst`.
2024-08-09 12:23:03 -03:00
Daniel Miller 85760bff27
Apply pythonpath option as early as possible (#12536)
This allows plugins loaded via '-p' to benefit from the new PYTHONPATH, making the option useful in more cases and less surprising.

For this to work it was required for the functionality to be part of Config rather than a separate plugin, which is unfortunate but in the end considered a small price to pay.

Fix #11118.

---------

Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
2024-08-06 07:47:27 -03:00
Rob Arrow c6c7ade7aa Remove quotes from example tmp_path_retention_policy
Previously the docs contained an example for `tmp_path_retention_policy`
which included quotes around the value. If the configuration was
actually set with this value. The following error would be encountered

`INTERNALERROR> ValueError: tmp_path_retention_policy must be either all, failed, none. Current input: "all".`

This is because the value of the field was not being unwrapped from
the quotes when parsed.

This commit removes the quotes from the example so that if used in the
configuration file, no error will occur.
2024-08-01 17:12:31 +01:00
Stefaan Lippens 7ce3222764
Make TerminalReporter public API and add to reference docs #6649 (#12661)
Fixes #6649
2024-07-29 08:46:39 -03:00
pytest bot 04bac8deaf Cherry-pick 8.3.0, 8.3.1 release notes 2024-07-20 19:27:14 +03:00
Marc Bresson 6933bef0b0
New docs about CI/BUILD_NUMBER env vars (#12578)
Closes #12577

Co-authored-by: Marc Bresson <marc.bresson@datategy.net>
Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
2024-07-08 10:26:59 -03:00
Zach Snicker 0adcc21f48
Support venv detection on Windows with mingw Python (#12545)
Closes #12544
2024-06-29 00:30:51 +03:00
Sviatoslav Sydorenko 39b548e6ea
📝 Make "setuptools entrypoint" term generic
This feature grew out of `setuptools` but the modern interface for
extracting this information from the distribution package metadata
is `importlib.metadata`. So the patch attempts to reflect this in
the documentation messaging.

Refs:
* https://docs.python.org/3/library/importlib.metadata.html#entry-points
* https://packaging.python.org/en/latest/guides/creating-and-discovering-plugins/#using-package-metadata
* https://packaging.python.org/en/latest/specifications/entry-points/#entry-points
2024-06-20 11:01:10 +02:00
Sam Jirovec cbf6bd9dd2
Issue #12290 - Docs using Furo Theme W/ Dark Mode (#12326)
* furo theme for docs site

* removing duplicate tocs from deprecations and reference pages

* removing pallets references in code and config

* reverting trainings to sidebar

* removed sphinx style and unpinned packaging version

* updated styles
2024-05-21 13:56:18 +00:00
Josh Soref 8d00811822
Spelling and minor changes (#12122) 2024-05-15 13:49:34 -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
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
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
tserg 909759de2d
Improve sentence in marks documentation (#12157) 2024-03-24 15:59:07 +01:00
Ran Benita e410705561 Cherry-pick 8.1.0 release notes
(cherry picked from commit 0a536810dc)
2024-03-03 23:27:02 +02:00
Bruno Oliveira d6134bc21e doc: document consider_namespace_packages option 2024-03-02 16:13:48 -03: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 22b541e4eb Merge pull request #11993 from pytest-dev/release-8.0.1
Prepare release 8.0.1

(cherry picked from commit 68524d4858)
2024-02-17 00:11:27 +02:00
Pierre Sassoulas 4546d5445a
Upgrade blacken-doc to black's 2024 style (#11899) 2024-01-31 13:53:21 +01:00
Ran Benita f017df443a
Merge pull request #11757 from bluetech/rm-removed-in-8
Remove pytest 8 deprecations
2024-01-03 16:53:10 +02:00
Ran Benita 215f4d1fab Remove `PytestRemovedIn8Warning`
Per our deprecation policy.
2024-01-03 14:29:45 +02:00
Marc Bresson effc2b0529
Clarified `markers` ini property. Fix #11738 (#11739) 2024-01-03 14:20:54 +02:00
Ran Benita f4e7b0d6e0 Remove deprecated `pytest_cmdline_preparse` hook 2024-01-02 12:20:47 +02:00
Ran Benita d3c7ba310c Merge pull request #11744 from pytest-dev/release-8.0.0rc1
Prepare release 8.0.0rc1

(cherry picked from commit 665e4e58d3)
2024-01-02 10:59:26 +02:00
Ran Benita acd445a3f3
Merge pull request #11646 from bluetech/pkg-collect
Rework Session and Package collection
2023-12-30 12:51:48 +02:00
Michał Górny 52db918a27
Fix handling empty values of NO_COLOR and FORCE_COLOR (#11712)
* Fix handling empty values of NO_COLOR and FORCE_COLOR

Fix handling NO_COLOR and FORCE_COLOR environment variables to correctly
be ignored when they are set to an empty value, as defined
in the specification:

> Command-line software which adds ANSI color to its output by default
> should check for a NO_COLOR environment variable that, when present
> *and not an empty string* (regardless of its value), prevents
> the addition of ANSI color.

(emphasis mine, https://no-color.org/)

The same is true of FORCE_COLOR, https://force-color.org/.

* Streamline testing for FORCE_COLOR and NO_COLOR

Streamline the tests for FORCE_COLOR and NO_COLOR variables, and cover
all possible cases (unset, set to empty, set to "1").  Combine the two
assert functions into one taking boolean parameters.  Mock file.isatty
in all circumstances to ensure that the environment variables take
precedence over the fallback value resulting from isatty check (or that
the fallback is actually used, in the case of both FORCE_COLOR
and NO_COLOR being unset).
2023-12-23 10:12:13 +02:00
Arthur Richard 047ba83dab
Improve pytest.exit docs (#11698)
Fixes #11695
2023-12-14 08:14:36 -03:00
Ran Benita 385796ba49 Rework Session and Package collection
Fix #7777.
2023-12-10 17:01:39 +02:00
Ran Benita c1339628d6
Merge pull request #11684 from bluetech/docs-nitpicky
docs: enable Sphinx nitpicky mode
2023-12-10 09:42:30 +02:00
Ran Benita 397769c45e
Merge pull request #11677 from bluetech/nodes-abc
nodes,python: mark abstract node classes as ABCs
2023-12-10 09:41:46 +02:00
Ran Benita 0ae02e2165 nodes,python: mark abstract node classes as ABCs
Fixes #11676
2023-12-07 16:41:07 +02:00
Ran Benita f76af423b0 doc/reference: document `FixtureLookupError` 2023-12-07 11:50:02 +02:00