Commit Graph

3022 Commits

Author SHA1 Message Date
Ronny Pfannschmidt 1ded74739b update-plugin-list: use json, use http caching, use gh action caches
this change
* switches from html index usage to json index usage
* adds using requests-cache as http cache to trim down runtime
* adds gh action caches for pip and the new http cache
2023-07-20 15:04:41 +02:00
Ran Benita 497a1d798a doc/example/parametrize: a few fixes/improvements
Remove "Indirect" from a few section names -- not actually indirect.

Also few minor updates to the related multipython.py example.
2023-07-20 09:51:11 +03:00
pytest bot a668719626 [automated] Update plugin list 2023-07-16 00:28:56 +00:00
Ran Benita 32f480814c
Merge pull request #11209 from bluetech/fixtures-doc-comments
fixtures: some tweaks & improvements
2023-07-15 19:40:48 +03:00
Ran Benita fb55615d5e Export `FixtureDef`
FixtureDef is used in the `pytest_fixture_setup` hook so needs to be
public. However since its current internals are quite dubious (and not
all marked with `_` prefix) I've added an explicit note that only
documented fields/methods are considered public.

Refs #7469.
2023-07-15 10:06:06 +03:00
Ran Benita b41acaea12 Switch to new-style pluggy hook wrappers
Fix #11122.
2023-07-14 22:47:48 +03:00
Ran Benita f1c9570a0e A few more Python>=3.8 simplifications 2023-07-10 23:20:11 +03:00
antosikv 99ab8ae884
Clarify docs for pytest.main default behavior (#11187)
Add explicit mentions of the default behavior to both API reference and
how-to section about ways to invoke pytest.

Co-authored-by: Ran Benita <ran@unusedvar.com>
2023-07-09 12:30:33 -03:00
pytest bot a3b4220d76 [automated] Update plugin list 2023-07-09 00:29:15 +00:00
Bruno Oliveira fd7a4d2429
Merge pull request #11106 from bluetech/docs-ref-collection-objs
reference: improve the node types docs a bit
2023-07-08 15:41:22 -03:00
Ran Benita b73ec8e5d1
doc: fix EncodingWarnings in examples (#11158)
Otherwise the warnings show in the regen output.
2023-07-08 15:40:05 -03:00
Zac Hatfield-Dodds 97ed533f63
Merge pull request #11169 from hugovk/test-me-rm-3.7 2023-07-06 22:28:44 -07:00
Zac Hatfield-Dodds b81003f6fb Incorporate legend into main table 2023-07-06 00:04:15 -07:00
mickeypash ddd773ecb1 [docs] add table nose x pytest naming comparison 2023-07-05 23:46:32 -07:00
Florian Bruhin b5bc53e441
Update open trainings (#11171) 2023-07-04 23:19:24 +02:00
Hugo van Kemenade 6baf9f2d31 Update docs and code after dropping EOL 3.7 2023-07-04 18:55:08 +03:00
github-actions[bot] b847084224
[automated] Update plugin list (#11159)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-07-03 11:45:17 -03:00
Zac Hatfield-Dodds 165fbbd12a Drop py37 from CI 2023-06-30 15:19:19 -07:00
Zac Hatfield-Dodds f4e3b4ad98 Drop Python 3.7 2023-06-30 14:55:42 -07:00
Ran Benita 81cfb3fc87
Merge pull request #11017 from erik-hasse/caplog-root-logger-docs
add a warning about modifying the root logger during tests
2023-06-28 09:28:46 +03:00
Ran Benita e132d6488f
Merge pull request #11139 from pytest-dev/update-plugin-list/patch-fe51121f3
[automated] Update plugin list
2023-06-26 15:33:14 +03:00
Thomas Grainger 518ca37cae
Update doc/en/deprecations.rst 2023-06-25 16:09:04 +01:00
Thomas Grainger 45f1a462d5
Apply suggestions from code review
Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
2023-06-25 16:08:53 +01:00
Thomas Grainger 4cd95eeabf
Merge branch 'main' into warn-when-a-mark-is-applied-to-a-fixture 2023-06-25 16:08:11 +01:00
pytest bot 1306b84241 [automated] Update plugin list 2023-06-25 00:27:02 +00:00
Ran Benita c8b1790ee7 python: change `pytest pkg/__init__.py` to only collect the `__init__.py` Module
Previously it would collect the entire package, but this is not what
users expect.

Refs #3749
Fixes #8976
Fixes #9263
Fixes #9313
2023-06-23 20:42:50 +03:00
Ran Benita 1b7896f83d Add PytestRemovedIn9Warning
It's good to have it available already in all 8.* versions, even if it's
not used yet.
2023-06-23 16:42:26 +03:00
Ran Benita a14745550a Merge pull request #11131 from pytest-dev/release-7.4.0
Prepare release 7.4.0

(cherry picked from commit fb03d1388b002f63973c663cb4929908a2ca81f5)
2023-06-23 14:19:51 +03:00
Ran Benita 1e8135df16 reference: add note that `pythonpath` does not affect `-p`
Fix #11118.
2023-06-22 15:45:20 +03:00
github-actions[bot] fa09f6dcc6
[automated] Update plugin list (#11117)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-06-18 09:40:52 -03:00
Florian Bruhin b55c02c3c9
doc: Add ep2023 training (#11113) 2023-06-15 14:17:14 +02:00
Ran Benita bd88a6412d reference: separate node types to their own section
I think it's helpful to separate the node classes from the other
objects, as they have their own unique usage.

I've chosen not to alphabetize the order, but to use a logical order
instead.

Also slightly improve the docstrings.
2023-06-14 15:57:56 +03:00
Ran Benita 264e7ac327 reference: add doc for `Package`
We document the other py collectors, we should document `Package` as
well.
2023-06-14 09:51:37 +03:00
Ran Benita 0142bb6687 Merge pull request #11096 from pytest-dev/release-7.3.2
Prepare release 7.3.2

(cherry picked from commit 5dcd2be4661bc606b3399bff3614c0691ce9c13f)
2023-06-10 22:31:49 +03:00
Ran Benita 0ded3297a9
Merge pull request #11086 from pytest-dev/update-plugin-list/patch-32de8e289
[automated] Update plugin list
2023-06-07 09:02:06 +03:00
pytest bot fc9cbbd4c4 [automated] Update plugin list 2023-06-06 14:05:44 +00:00
Ran Benita 1a17539065
Merge pull request #10853 from stefmolin/patch-1
Update fixture scope in package/directory fixture example.
2023-06-06 17:04:45 +03:00
pytest bot 1daa8129c6 [automated] Update plugin list 2023-06-04 00:26:58 +00:00
pytest bot 5313d50e18 [automated] Update plugin list 2023-05-28 00:22:05 +00:00
Chris Mahoney 4f3f36c396
Add alias `--config-file` to `-c` (#11036)
Fixes #11031

Signed-off-by: Chris Mahoney <chrismahoey@hotmail.com>
Co-authored-by: Chris Mahoney <chrismahoey@hotmail.com>
2023-05-26 07:56:18 -03:00
Jarrett Keifer 751d726d21
nonpython example now repr all exceptions
The definition of `repr_failure` on the `YamlItem` subclass only handled the custom `YamlException` class, which hides all other errors from the user. By adding in the `super` call we ensure all other exception types also appropriately handled by `repr_failure`.
2023-05-23 20:06:05 -07:00
github-actions[bot] 9e491f430e
[automated] Update plugin list (#11027)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-05-21 10:47:02 -03:00
Roberto Aldera 9fa82598a9
Use NamedTuple for pytest_report_teststatus return value (#10972)
Closes #10872

---------

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2023-05-19 08:24:28 -03:00
Erik Hasse a2feb6bd00 add a warning about modifying the root logger during tests 2023-05-18 09:26:16 -05:00
Ville Skyttä 6041511fb4
Spelling and grammar fixes (#11014) 2023-05-18 10:10:44 -03:00
Bruno Oliveira 1636322995
Reference "Status of Python Versions" in backwards-compatibility policy
As suggested in #10981.
2023-05-16 20:24:06 -03:00
github-actions[bot] 612489e2bd
[automated] Update plugin list (#11001)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-05-15 08:26:41 -03:00
Bruno Oliveira faeb16146b Consider testpaths for initial conftests
The 'testpaths' option is meant to be identical to execute
pytest passing the 'testpaths' directories explicitly.

Fix #10987
2023-05-12 09:34:15 -03:00
Bruno Oliveira b241c0b479 Fix defaults for tmp_path_retention_count and tmp_path_retention_policy in docs 2023-05-12 09:34:15 -03:00
leeyueh f84fea0888
Update usage.rst (#10974)
Added a note for single quotation used in Windows.
2023-05-10 22:28:52 -03:00
github-actions[bot] a88ae8289c
[automated] Update plugin list (#10968)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-05-09 19:05:13 -03:00
pytest bot be774667c2 [automated] Update plugin list 2023-04-30 00:23:40 +00:00
Sergey Kim 725de3a0d3
add flake8-pytest-style mention to goodpractices (#10939) 2023-04-28 23:47:47 +03:00
Florian Bruhin a15f544962
doc: Fix 2024 training location (#10947) 2023-04-26 08:13:06 +02:00
Bryan Ricker 158f41fdf8
Fix documentation typo (#10942) 2023-04-25 10:49:16 +02:00
pytest bot 15156757b6 [automated] Update plugin list 2023-04-23 00:21:26 +00:00
Florian Bruhin 0860f4e916
Add 2024 pytest training (#10933) 2023-04-22 21:22:25 +02:00
pytest bot 28783e5d23 [automated] Update plugin list 2023-04-16 00:21:39 +00:00
Bruno Oliveira ece756fcb4 Merge pull request #10913 from pytest-dev/release-7.3.1
Prepare release 7.3.1

(cherry picked from commit a1f7a204df45a4fd07d5d62128f61198e5dd7f23)
2023-04-14 15:15:28 -03:00
Ran Benita 90412827c3 Revert "Correctly handle tracebackhide for chained exceptions (#10772)"
This reverts commit 431ec6d34e.

Fix #10903.
Reopen #1904.
2023-04-12 19:23:25 +03:00
Bruno Oliveira 6dcd652d4a
Amend changelog note for removal of attrs (#10888)
As discussed in https://github.com/pytest-dev/pytest/pull/10669#issuecomment-1501497729, we should
make the reasoning behind this change more clear, as well as thank the attrs maintainers for the
many years of cooperation and support.

Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
2023-04-10 13:04:02 -03:00
pytest bot 22951bba67 [automated] Update plugin list 2023-04-09 00:22:30 +00:00
Ran Benita bf47357511 Merge pull request #10881 from pytest-dev/release-7.3.0
Prepare release 7.3.0

(cherry picked from commit cec5bfe0588adaa2ca36c72c724378982db6410a)
2023-04-09 00:50:37 +03:00
github-actions[bot] 31d0b51039
[automated] Update plugin list (#10857)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-04-04 13:17:43 -03:00
Stefanie Molin f1c7585184
Update fixture scope in package/directory fixture example. 2023-03-31 10:00:45 -07:00
github-actions[bot] a3b39069bc
[automated] Update plugin list (#10838)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-03-26 08:32:13 -03:00
github-actions[bot] 172c832cbd
[automated] Update plugin list (#10823)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-03-24 11:41:07 -03:00
Ronny Pfannschmidt 54864f0c9b bugfix: fix imports for simple example 2023-03-17 21:58:26 +01:00
Ronny Pfannschmidt ba969d2ae7 run regendoc 2023-03-17 21:58:26 +01:00
github-actions[bot] 7af1e4e4ed
[automated] Update plugin list (#10810)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-03-12 13:04:50 -03:00
Stefanie Molin 0ae04ae629
Include `pyproject.toml` in help section that lists out config files with ini-options (#10807) 2023-03-11 10:59:02 -03:00
Florian Bruhin 723035be7f
doc: Remove done training (#10805) 2023-03-10 20:47:03 +00:00
Paul Kehrer a869141b3d
New option to allow a progress report even when capture=no (#10755) 2023-03-07 17:49:37 -03:00
Bruno Oliveira 5e98aefc92
Merge pull request #10794 from pytest-dev/update-plugin-list/patch-d5dda84ef
[automated] Update plugin list
2023-03-06 08:16:06 -03:00
bluthej 5a61ec3d4a Fix example in the documentation (#10782) 2023-03-05 17:01:21 +01:00
pytest bot 1d48b3021d [automated] Update plugin list 2023-03-05 00:25:29 +00:00
Bruno Oliveira 517e02e59e Merge pull request #10792 from pytest-dev/release-7.2.2
Prepare release 7.2.2

(cherry picked from commit 3ce6030f0cc0e6fb18cbee1a4a8b1cec8c6d0b0c)
2023-03-03 16:14:11 -03:00
Billy 88c9e92258
Minor updates to fixtures docs (#10724)
Updated the c fixture to be a little more consistent with other fixtures in the corresponding image. for example both e and g both have edges connected with the fixtures that they explicitly depend on.
2023-02-28 12:42:33 -03:00
github-actions[bot] 13ea4780b8
[automated] Update plugin list (#10752)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-02-27 08:55:33 -03:00
Manuel Jacob da626e7186
Update import mode documentation to not refer to __import__() anymore. (#10747)
Nowadays, the prepend and append import modes use importlib.import_module() instead of __import__().

There was a phrase “which avoids having to use `__import__`”, in which I couldn’t just replace `__import__` by `importlib.import_module` because the latter is used (in insert_missing_modules()) also when using importlib mode. Therefore I removed the part from the sentence.
2023-02-18 18:55:46 -03:00
bitzge 051f8f1f0f
Add CI and BUILD_NUMBER env var in docs (#10749) 2023-02-18 18:52:14 -03:00
Florian Bruhin 464f29901f
Update open training (#10739) 2023-02-15 14:06:24 +00:00
Garvit Shubham aa72496d24
Fix entry-points declaration in the documentation example using Hatch
Closes #10721
2023-02-14 10:57:32 -03:00
github-actions[bot] 9048621002
[automated] Update plugin list (#10726)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-02-12 21:39:45 -03:00
pre-commit-ci[bot] 59e7d2bbc9
[pre-commit.ci] pre-commit autoupdate (#10712)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 22.12.0 → 23.1.0](https://github.com/psf/black/compare/22.12.0...23.1.0)
- [github.com/PyCQA/autoflake: v2.0.0 → v2.0.1](https://github.com/PyCQA/autoflake/compare/v2.0.0...v2.0.1)

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

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

* Update .pre-commit-config.yaml

* [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: Bruno Oliveira <nicoddemus@gmail.com>
2023-02-07 19:30:33 -03:00
Mahesh Vashishtha af99040123
Add a note about -W vs filterwarnings. (#10713)
Closes #10687

Signed-off-by: mvashishtha <mahesh@ponder.io>
2023-02-07 19:27:34 -03:00
github-actions[bot] 9c93c96b14
[automated] Update plugin list (#10707)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-02-07 07:59:57 -03:00
github-actions[bot] 4a46ee8bc9
[automated] Update plugin list (#10699)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-01-30 10:15:02 -03:00
vin01 86a1beba07
Clarify docs for `match` regarding escaping (#10695)
Add example using `re.escape` to escape arbitrary literal strings which might contain regular expression characters like `.` or `)`.

Closes #10595
2023-01-27 08:11:00 -03:00
pre-commit-ci[bot] 61cfaacec6
[pre-commit.ci] pre-commit autoupdate (#10671)
updates:
- [github.com/asottile/blacken-docs: v1.12.1 → 1.13.0](https://github.com/asottile/blacken-docs/compare/v1.12.1...1.13.0)
- [github.com/pre-commit/pygrep-hooks: v1.9.0 → v1.10.0](https://github.com/pre-commit/pygrep-hooks/compare/v1.9.0...v1.10.0)
2023-01-17 12:09:19 +02:00
Bruno Oliveira b2ac31cc9f Merge pull request #10659 from pytest-dev/release-7.2.1
Prepare release 7.2.1

(cherry picked from commit 94c05bc2a489a3d6eb5cb47991741f8a61bb4099)
2023-01-14 09:21:43 -03:00
Yusuke Kadowaki 10220d3f31 Change the default policy to all 2022-12-25 00:18:38 +09:00
Bruno Oliveira b90e7b84d0 Remove reference to explicit pytest tox support
This reference no longer exists in tox 4.0 docs.
2022-12-14 08:38:11 -03:00
Bruno Oliveira 19807ab79a Pin packaging while building docs
Packaging >=22 no longer supports 'latest' versions, which is the version that is assigned when building the docs.

https://github.com/pytest-dev/pytest/pull/10578#issuecomment-1348249045

Also first install pytest, then `docs/en/requirements.txt`:

Installing the requirements last will honor pins of libraries
shared between pytest and the docs build.
2022-12-14 08:38:11 -03:00
pytest bot 39b6bb551c [automated] Update plugin list 2022-12-04 00:20:05 +00:00
Marko Pacak 9fbd67dd4b
Class methods can now be discovered as tests (#10552)
Fix #10525
2022-12-02 15:53:04 +00:00
Bruno Oliveira 314e623304
Merge pull request #10549 from yusuke-kadowaki/more_doc_update
Documentation update for the tmp_path configurations
2022-12-01 12:23:43 -03:00
Yusuke Kadowaki 62e75c7d55 Documentation update for tmp_path configurations 2022-12-01 22:29:46 +09:00
github-actions[bot] fd30759d94
[automated] Update plugin list (#10536)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2022-11-29 09:14:38 +00:00
Yusuke Kadowaki f513d33d5a
Modify documentation to use `.stash` when storing test results. (#10535) 2022-11-27 22:09:56 +02:00