Commit Graph

2282 Commits

Author SHA1 Message Date
Eddie a76df875c7
Remove space inside of dotted attribute 2021-11-10 12:54:21 -08:00
Florian Bruhin f9afcd2d8a
More pytest 7 changelog fixes (#9285)
* Remove changelog entry for #8251

Reverted in #8903

* Move #9202 changelog to to trivial

This won't concern users of pytest

* Streamline deprecation changelogs/docs

* Remove #8994 changelog

This is an impovement for a warning introduced in this release, so including it in a changelog against the last release seems confusing.

* Remove #9241 changelog

This is an impovement for a doc update introduced in this release, so including it in a changelog against the last release seems confusing. The issue number also seems about something different.

* Remove #8897 changelog

Empty file...

* Various minor changelog fixes
2021-11-10 15:16:24 +01:00
Simon K eb6c4493b2
Deprecation of `msg=` for both `pytest.skip()` and `pytest.fail()`. (#8950)
* porting pytest.skip() to use reason=, adding tests

* avoid adding **kwargs, it breaks other functionality, use optional msg= instead

* deprecation of `pytest.fail(msg=...)`

* fix bug with not capturing the returned reason value

* pass reason= in acceptance async tests instead of msg=

* finalising deprecations of `msg` in `pytest.skip()` and `pytest.fail()`

* Update doc/en/deprecations.rst

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>

* Update doc/en/deprecations.rst

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>

* fix failing test after upstream merge

* adding deprecation to `pytest.exit(msg=...)`

* add docs for pytest.exit deprecations

* finalising deprecation of msg for pytest.skip, pytest.exit and pytest.fail

* hold a reference to the Scope instance to please mypy

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2021-11-08 15:31:14 +01:00
Bruno Oliveira b378f9a6e0
Merge pull request #9276 from hoefling/doc/extlinks-bpo 2021-11-08 09:41:26 -03:00
Bruno Oliveira 13d23a2dd5
Merge pull request #9275 from hoefling/doc/extlinks-gh-pull 2021-11-08 09:39:50 -03:00
github-actions[bot] 2792f9184e
[automated] Update plugin list (#9274)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2021-11-07 23:12:57 +02:00
oleg.hoefling 16e15b99ae
sphinx 3 compat
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2021-11-07 15:24:57 +01:00
oleg.hoefling 36265ccbf6
replace hardcoded links to bugs.python.org with extlinks
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2021-11-07 15:24:57 +01:00
oleg.hoefling bba0ce4877
replace hardcoded links to github pull requests with extlinks
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2021-11-07 15:18:36 +01:00
Oleg Höfling 49f934618c
Replace hardcoded links to Github issues with extlinks (#9234) 2021-11-06 11:16:11 +02:00
Ran Benita b0aa870b11 Export CollectReport and TestReport
Refs #7469.
2021-11-02 20:58:51 +02:00
Ran Benita a53abe93d8
Merge pull request #9208 from bluetech/legacypath-plugin
Add legacypath plugin, move py.path stuff there
2021-11-02 20:35:12 +02:00
pytest bot 81e2d46302 [automated] Update plugin list 2021-10-31 00:11:03 +00:00
andrewdotn 1824349f74
Use Ubuntu 20.04, lualatex for readthedocs builds (#9242) 2021-10-30 11:21:14 -03:00
Ran Benita e6eac28f0e legacypath: only add `testdir` and `tmpdir` fixtures if corresponding plugins are registered
This preserves the existing behavior and gives a proper error message
in case e.g. `testdir` is requested without the `pytester` plugin being
loaded.
2021-10-29 13:11:12 +03:00
Ran Benita 5e883f5195 Move tmpdir to legacypath plugin 2021-10-28 21:51:51 +03:00
Ran Benita 1df28a4450 Move testdir to legacypath plugin 2021-10-28 21:51:51 +03:00
andrewdotn bcad6e8e9a
Make plugin list in PDF docs readable (#9241)
The current PDF docs attempt to format the list of all plugins as a
table, without any word-wrapping of the plugin description. That results
in almost all the information getting cut off. This PR formats the same
information into more of a paragraph format for the PDF, with nothing
cut off.

Fixes #451
2021-10-28 11:31:52 +03:00
Ran Benita b7fc0003fd
Merge pull request #9232 from bluetech/deprecate-node-fspath-args
Deprecate Node constuctor fspath argument, and other small changes/fixes
2021-10-27 09:26:57 +03:00
Ran Benita 7706fd6840 nodes: deprecate fspath arguments to node constructors
This is unfortunately a dependency on `py.path` which cannot be moved to
an external plugins or eased in any way, so has to be deprecated in
order for pytest to be able to eventually remove the dependency on `py`.
2021-10-27 08:36:10 +03:00
Ran Benita 99363ad7ff recwarn: fix was -> were in DID NOT WARN message 2021-10-27 08:36:10 +03:00
Ran Benita 3c5c5feb04
Merge pull request #9230 from bluetech/pytester-transitive-public
Export pytester transitive types
2021-10-27 08:05:08 +03:00
pytest bot 2f0e1cd230 [automated] Update plugin list 2021-10-24 00:11:06 +00:00
Ran Benita 60ca83746b docs: change references to 6.3 -> 7.0
The plans have changed, next version will be 7.0 not 6.3.
2021-10-23 22:49:55 +03:00
Ran Benita 755ce9bc80 hookspec: improve legacy path deprecation docs 2021-10-23 22:49:54 +03:00
Ran Benita 11e36c8493 Make transitive Pytester types public
Export `HookRecorder`, `RecordedHookCall` (originally `ParsedCall`),
`RunResult`, `LineMatcher`.

These types are reachable through `Pytester` and so should be public
themselves for typing and other purposes.

The name `ParsedCall` I think is too generic under the `pytest`
namespace, so rename it to `RecordedHookCall`.

The `HookRecorder`'s constructor is made private -- it should only be
constructed by `Pytester`.

`LineMatcher` and `RunResult` are exported as is - no private and no
rename, since they're being used.

All of the classes are made final as they are not designed for
subclassing.
2021-10-23 10:59:18 +03:00
Oleg Höfling 1e9e16d829
Replace hardcoded links to PyPI with extlinks (#9224) 2021-10-22 09:47:57 -03:00
Ran Benita 7314b32b63 doc: modernize discussion of setup.py in "Good Integration Practices" 2021-10-22 10:24:39 +03:00
Bruno Oliveira 4a3834101e
Merge pull request #9209 from pytest-dev/update-plugin-list/patch-0696d3eda
[automated] Update plugin list
2021-10-19 06:53:25 -03:00
Bruno Oliveira 20a69e11aa
Merge pull request #9214 from nicoddemus/confcutdir-9210 2021-10-19 06:52:52 -03:00
Bruno Oliveira c000955dde Remove incorrect docs about confcutdir being a config option
Fix #9210
2021-10-18 19:20:27 -03:00
pytest bot 3cc0c451e7 [automated] Update plugin list 2021-10-17 00:11:56 +00:00
Bruno Oliveira 5fc7b21391
Use xelatex engine for better Unicode support (#9197) 2021-10-12 10:12:15 -03:00
James Myatt ccd3874d7a
Recommend not integrating with setuptools (#9185) 2021-10-11 15:28:27 +03:00
Ran Benita da3b3012b1
Merge pull request #9184 from bluetech/reportinfo-pathlike
[7.0] Change `Node.reportinfo()` return value from `py.path` to `str|os.PathLike[str]`
2021-10-11 14:33:03 +03:00
github-actions[bot] 4b417ac38e
[automated] Update plugin list (#9186)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2021-10-10 12:00:43 -03:00
Ran Benita 7eee5c1634 Change `Node.reportinfo()` return value from `py.path` to `str|os.PathLike[str]`
`reportinfo()` is the last remaining py.path-only code path in pytest,
i.e. the last piece holding back py.path deprecation. The problem with
it is that plugins/users use it from both sides -- implementing it
(returning the value) and using it (using the return value). Dealing
with implementers is easy enough -- allow to return `os.PathLike[str]`.
But for callers who expect strictly `py.path` this will break and
there's not really a good way to provide backward compat for this.

From analyzing a corpus of 680 pytest plugins, the vast majority of
`reportinfo` appearances are implementations, and the few callers don't
actually access the path part of the return tuple.

As for test suites that might access `reportinfo` (e.g. using
`request.node.reportinfo()` or other ways), that is much harder to
survey, but from the ones I searched, I only found case
(`pytest_teamcity`, but even then it uses `str(fspath)` so is unlikely
to be affected in practice). They are better served with using
`node.location` or `node.path` directly.

Therefore, just break it and change the return type to
`str|os.PathLike[str]`.

Refs #7259.
2021-10-09 15:02:03 +03:00
Bruno Oliveira fb52fc5163
Merge pull request #9070 from andrewdotn/main 2021-10-05 16:51:58 -03:00
Brian Okken c82bda259c
Add a `pythonpath` setting to allow paths to be added to `sys.path`. (#9134) 2021-10-05 09:36:38 +03:00
Zac Hatfield-Dodds e763fde482
Merge pull request #9158 from hoefling/doc/internal-crossrefs
replace hardcoded urls to docs.pytest.org with internal crossrefs, add crossrefs to numpy docs, use sphinx pep role
2021-10-05 08:43:19 +11:00
oleg.hoefling 3926526c95
revert changes in doc/en/announce
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2021-10-04 20:06:13 +02:00
Ronny Pfannschmidt 028eb6fab6
Merge pull request #9115 from RonnyPfannschmidt/fix-regendoc
fix #8818 - run regendoc without tox cachedir
2021-10-04 19:11:45 +02:00
Bruno Oliveira c4557c3192
Merge pull request #9150 from nicoddemus/issue-9141-fixture-docs 2021-10-04 09:48:19 -03:00
Ronny Pfannschmidt c21ef7ba22 fix #8818 - run regendoc without tox cachedir
#4270 introduced per tox env pytest cachedirs and
never protected regendoc against it
2021-10-04 08:56:26 +02:00
oleg.hoefling d58ee2b677
replace hardcoded urls to docs.pytest.org with internal crossrefs, add external crossrefs where possible
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2021-10-04 00:23:41 +02:00
pytest bot 618ee0f268 [automated] Update plugin list 2021-10-03 00:11:19 +00:00
Bruno Oliveira ac3614b999 Add note about fixture teardown and SIGTERM and SIGQUIT signals
Close #9141
2021-10-01 16:12:03 -03:00
Ran Benita f65dfc39f3
Merge pull request #9123 from pytest-dev/update-plugin-list/patch-112204cf8
[automated] Update plugin list
2021-10-01 16:31:59 +03:00
Ran Benita 4b13b5993e Fix syntax typo in writing_hook_functions.rst 2021-10-01 10:26:56 +03:00
pytest bot 4a016db7b4 [automated] Update plugin list 2021-09-26 00:11:24 +00:00