Commit Graph

2980 Commits

Author SHA1 Message Date
Florian Bruhin 1c04a92503
doc: Link pytest.main to how-to guide (#11287) 2023-08-06 12:39:11 +02:00
Christoph Anton Mitterer cc0adf6bf3
doc: update information about assertion messages (#11285)
It was pointed out[0] that the previous behaviour has been obsoleted by
commit 37bd1e03cb.

[0] https://github.com/pytest-dev/pytest/issues/11265#issuecomment-1666581197

Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
2023-08-05 19:30:41 +00:00
Christoph Anton Mitterer b8b74331b4
Improve docs for Parametrizing conditional raising (#11279)
What one typically actually wants in such a case is both, checking for some
resulting values *and* checking for some expected exception.

Since this is easily possible with the `nullcontext` context manager, adapt the
example accordingly (needlessly using a different name rather just confuses people).

Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
2023-08-03 13:31:17 -03:00
Ran Benita a21fb87a90 python: change `Package` to no longer be a `Module`/`File`
Fix #11137.
2023-07-28 22:49:24 +03:00
Uday Kumar d3552ef4c0
Clarify doc for running tests by nodeid section (#11249) 2023-07-28 07:06:38 +00:00
Ran Benita 161ba87300 doc/usage: clarify "Run tests by node ids"
Fix #11107, #11235.
2023-07-24 00:00:25 +03:00
Ran Benita f2b6040e9e
Merge pull request #11238 from bluetech/doc-not-indirect
doc/example/parametrize: a few fixes/improvements
2023-07-23 13:07:40 +03:00
Florian Bruhin e3247834e2
Remove ep2023 training (#11241) 2023-07-22 20:16:59 +02:00
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