Commit Graph

2462 Commits

Author SHA1 Message Date
Ran Benita 0db1ff0d82 doc: document {Code,TracebackEntry}.path changes as breaking
Closes #9423.
2021-12-27 15:27:38 +02:00
Kian Meng, Ang 55debfad1f
Fix typos (#9424) 2021-12-27 09:23:15 -03:00
Ran Benita 7a42db2bf0
Merge pull request #9443 from bluetech/undocumented-hooks
doc/reference: add 4 missing hooks to reference
2021-12-27 11:11:56 +02:00
Hasan Ramezani 5599c5ad45
Drop Python3.6 in CI, setup.cfg, and readme. 2021-12-26 21:08:37 +01:00
pytest bot 427f035b76 [automated] Update plugin list 2021-12-26 00:14:18 +00:00
Ran Benita 05d46ca850 doc/reference: add 4 missing hooks to reference
Fix #9434.
2021-12-25 13:54:42 +02:00
Ran Benita 8071ad6b90 doc: fix a reference in "Writing hook functions" 2021-12-25 10:30:59 +02:00
pytest bot a73a9a12a2 [automated] Update plugin list 2021-12-19 00:12:37 +00:00
Ran Benita 0e69c62ece doc: add a `hook` crossref type
Allow writing

    🪝`pytest_cmdline_main`

instead of

    :func:`pytest_cmdline_main <_pytest.hookspec.pytest_cmdline_main>`
2021-12-12 16:29:30 +02:00
pytest bot 99a8be200a [automated] Update plugin list 2021-12-12 00:12:01 +00:00
Ran Benita 0f39f11d88 Remove deprecated `pytest.collect` module 2021-12-07 22:27:35 +02:00
Ran Benita 41d8fb09ca Remove deprecated `pytest_warning_captured` hook 2021-12-07 22:27:35 +02:00
Ran Benita 0b0e2d2dbb Remove deprecated `_fillfuncargs` function 2021-12-07 22:27:35 +02:00
Éric b691d31897 fix typo 2021-12-07 18:16:59 +02:00
Florian Bruhin 5cb50fa13c
Fix changelog URL in 7.0.0rc1 announcement (#9379)
The changelog does not exist at /stable because an rc isn't stable...
2021-12-07 10:04:55 +00:00
Florian Bruhin 0ad452bcba
Prepare release version 7.0.0rc1 (#9375) (#9377)
Co-authored-by: pytest bot <pytestbot@gmail.com>
(cherry picked from commit 85897eddc6d31c5825f5ca28f85e69b8d1506fc4)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-07 10:13:36 +01:00
Florian Bruhin 3a479db126
Fix hook param name in nonpython example (#9373)
Follow up to #9363
2021-12-06 22:55:06 +01:00
Florian Bruhin 663be09723
Improve reference and path/fspath docs (#9341)
* Improve reference and path/fspath docs

Closes #9283

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

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

* fixups

* Add explanation

* Update wording after #9363

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-12-06 11:25:05 +01:00
pytest bot 72b7334f1d [automated] Update plugin list 2021-12-05 00:12:43 +00:00
Bruno Oliveira a335ade1f5
Rename pathlib hook parameters (#9363)
* Rename pytest_ignore_collect fspath parameter to collection_path

* Rename pytest_collect_file fspath parameter to file_path

* Rename pytest_pycollect_makemodule fspath parameter to module_path

* Rename pytest_report_header startpath parameter to start_path

* Rename pytest_report_collectionfinish startpath parameter to start_path

* Update docs with the renamed parameters

* Use pytest-flakes fork temporarily to prove it works

* Use pytest-flakes 4.0.5
2021-12-03 13:14:09 +01:00
Bruno Oliveira ed24f29e60 Change copyright notice so yearly updates are not needed
Just learned that we don't need to do this every year: https://hynek.me/til/copyright-years

Followed Go's example of only stating the starting year: https://github.com/golang/go/blob/master/LICENSE

Btw any ideas why the dates vary? Some start in 2004, others 2013, 2015... shouldn't be the same year for all locations?
2021-11-30 09:28:23 -03:00
Ben Davies 86bcaad828 Fix output of example test method. 2021-11-30 14:55:05 +11:00
pytest bot 7de752a50b [automated] Update plugin list 2021-11-28 00:12:22 +00:00
Florian Bruhin 8436d695e5
Fix doc issues in deprecation change (#9336)
Follow-up to #9309.

The issue in the changelog broke the docs build with:

doc/en/_changelog_towncrier_draft.rst:47: WARNING: Inline literal start-string
without end-string.

The second change isn't as critical, but caused the text to be rendered as
monospace including the tilde (i.e. `~pytest.PytestDeprecationwarning`).
2021-11-25 09:43:23 +01:00
Ran Benita df9e94fbca
Change deprecation warnings into errors for 7.0 release, using a new mechanism (#9309) 2021-11-21 17:13:44 +02:00
github-actions[bot] 4fd897a631
[automated] Update plugin list (#9326)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2021-11-21 17:12:22 +02:00
Ran Benita 128f29ee35 Categorize deprecation warnings to `PytestRemovedInXWarning`
Closes #7480.

This allows us to more easily follow our deprecation policy of turning
warnings into errors for the X.0 releases before complete removal in
X.1.

It also makes the deprecation timeline clear to both the users and
pytest developers -- it can be hard to keep track.

Note that the designation is not meant to be a binding contract - if the
time comes for removal of a specific deprecation but we decide it's too
soon, can just bump it to the next major.

Inspired by Django:
https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/submitting-patches/#deprecating-a-feature
2021-11-14 23:57:10 +02:00
Bruno Oliveira 3dc17f1c3b
Merge pull request #9293 from hoefling/doc/extlinks-gh-user 2021-11-13 10:57:37 -03:00
Ran Benita 062d91ab47
python: remove the `Instance` collector node 2021-11-13 14:03:44 +02:00
Eddie a76df875c7
Remove space inside of dotted attribute 2021-11-10 12:54:21 -08:00
oleg.hoefling 2f1096cd55
replace hardcoded links to github user profiles with extlinks
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2021-11-10 20:47:27 +01: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
Ran Benita 037d2903be
Merge pull request #9112 from bluetech/plugin-list-escape
scripts/update-plugin-list: escape summary for special RST chars
2021-09-22 17:00:07 +03:00
Ran Benita 4ae4bec968 scripts/update-plugin-list: escape summary for special RST chars
A new plugin has this summary:

    Continiously runs pytest on changes in *.py files

The `*` is interpreted as a special character and fails the CI.

Add some rudimentary escaping to hopefully prevent this.
2021-09-22 16:39:15 +03:00
Bruno Oliveira bec42f7b0b
Merge pull request #9092 from nicoddemus/cleanup-projects-page 2021-09-22 10:28:45 -03:00
Ran Benita cf5b7a0958
Merge pull request #9103 from pytest-dev/update-plugin-list/patch-60e995d90
[automated] Update plugin list
2021-09-22 15:55:49 +03:00
ziebam 520aa61e19 Improve docs for pytester.copy_example 2021-09-22 00:16:52 +02:00
pytest bot 86fc02bfcb [automated] Update plugin list 2021-09-19 00:10:14 +00:00
Bruno Oliveira c761c45cf9 Remove obsolete projects page from docs
The projects page unfortunately contains a lot of old projects, and some information there appears to be stale.

It was created at a time pytest was starting to be used, but seems pointless now as pytest is the most popular testing framework, so listing a few dozen projects which use it seems pointless.

Rather than updating it, I think we should remove it because this has the chance to become stale again soon, and not sure how valuable it is anyway.
2021-09-14 08:04:49 -03:00
Simon K 0e7bb34081
adding contact and badge for pytest-dev discord server (#9078)
* adding badges/docs for pytest-dev discord and pytest libera web chat
2021-09-12 18:22:44 +01:00
pytest bot 0407c62121 [automated] Update plugin list 2021-09-12 00:11:27 +00:00
Florian Bruhin 1c1dcf27c8 Remove finished open training 2021-09-09 22:29:34 +02:00
Zac Hatfield-Dodds 8900e3b937
Merge pull request #9041 from hoefling/doc/stdlib-crossrefs 2021-09-07 21:22:24 +10:00
pytest bot 1f00461e57 [automated] Update plugin list 2021-09-05 00:09:51 +00:00
Andrew Neitsch a9edfdf9db Run black on conf.py 2021-09-02 20:42:29 -06:00
Andrew Neitsch b46d5f4657 Only use inkscapeconverter if inkscape installed 2021-09-02 20:40:17 -06:00
Andrew Neitsch e929d15848 Include figures in PDF docs
The PDF documentation on readthedocs was missing the figures in the
fixtures reference chapter. This PR uses a Sphinx plugin that
automatically converts the checked-in SVG files to the PDF input files
that LaTeX requires.

The SVG-to-PDF conversion is done by inkscape, which gave the best
conversion among the tools I tried. However, it [does not yet
understand][href-bug] that you can write a plain `href` instead of
`xlink:href` in svg files, so I’ve had to edit the SVG files
accordingly.

[href-bug]: https://github.com/TeX-Live/luatex.git
2021-09-02 17:40:41 -06:00
Simon K 740abd9684
#9062 - Allow `--stepwise-skip` to implicitly enable `--stepwise` (#9064)
* #9062 - Allow `--stepwise-skip` to implicitly enable `--stepwise`

* Update changelog/9062.improvement.rst

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

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2021-08-30 19:24:14 +01:00
Bruno Oliveira ea5ff44ef3 Merge pull request #9057 from pytest-dev/release-6.2.5
(cherry picked from commit 16664a1b72c668161553b64e741492206af441bc)
2021-08-30 14:44:49 -03:00
pytest bot 544ecce677 [automated] Update plugin list 2021-08-29 00:09:53 +00:00
oleg.hoefling d1aea7d7a8
use intersphinx crossrefs to stdlib docs where possible instead of hardcoded URLs
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2021-08-26 16:05:03 +02:00
Bruno Oliveira 109bc2649d Adapt docs references to use pluggy 1.0
Also use the intersphinx reference instead of the class directly.
2021-08-26 09:52:05 -03:00
William Jamir Silva 696bf96c83
Fix typo in fixture.rst 2021-08-24 09:32:40 -03:00
pytest bot 1b130d4404 [automated] Update plugin list 2021-08-22 00:09:13 +00:00
Emmanuel Meric de Bellefon ec2099e057
Update index.rst 2021-08-21 11:11:37 +02:00
Florian Bruhin c9870480e0
doc: Update trainings (#9022) 2021-08-19 18:40:19 +02:00
Hugo van Kemenade 5ec89fd6e5 Docs: refer to non-deprecated unittest alias 2021-08-18 12:43:59 +03:00
Bruno Oliveira 0f79fc6dbb
Merge pull request #8752 from azmeuk/issue-7132-syntax-highlight-themes 2021-08-15 09:06:41 -03:00
pytest bot 1cbb67f71b [automated] Update plugin list 2021-08-15 00:09:52 +00:00
Éloi Rivard 7770dacb8d pygments themes are customizable 2021-08-13 19:15:01 +02:00
Terje Runde 2439729413
logging: Make it possible to add cli colors to custom log levels
Closes #8803
PR #8804

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Co-authored-by: Terje Runde <terje.runde@flir.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-08-09 13:48:47 +00:00
pytest bot 4d2944e1d4 [automated] Update plugin list 2021-08-08 00:10:10 +00:00
pytest bot fed18fb76d [automated] Update plugin list 2021-08-01 00:10:10 +00:00
Simon K c27db3bd8e
Deprecate pytest_cmdline_preparse
Close #8592 

PR #8956
2021-07-31 10:53:43 -03:00
Emmanuel Arias 2834b39b65
Add examples of parametrizing classes and all tests in a module
Closes #8947

PR #8962
2021-07-31 13:26:25 +00:00
Ran Benita 6247a95601
Merge pull request #8920 from bluetech/stabilize-store
Rename Store to Stash and make it public
2021-07-31 10:32:30 +03:00
symonk a9a934e8ce fix minor typo in writing hook functions documentation 2021-07-31 01:49:53 +01:00
pytest bot 8b5b3575a0 [automated] Update plugin list 2021-07-25 00:08:36 +00:00
Ran Benita c6bdeb8491 stash: make Stash and StashKey public
It's had enough time to bake - let's allow external plugins to use it.
2021-07-24 17:40:08 +03:00
Bruno Oliveira 5e39f43e7c contact.rst: Added github discussions
Ported from #8932
2021-07-23 09:40:11 -03:00
pytest bot 0a1f58a912 [automated] Update plugin list 2021-07-18 00:08:39 +00:00
Thomas Grainger 388691a205
rename tmpdir.rst to tmp_path.rst (#8905) 2021-07-14 12:53:27 -03:00
Bruno Oliveira 69356d20cf
Merge pull request #8903 from nicoddemus/remove-fspath-deprecation
Revert fspath deprecation
2021-07-14 09:32:48 -03:00
Bruno Oliveira 828fde1156
Merge pull request #8858 from The-Compiler/update-doc-urls 2021-07-14 09:28:46 -03:00
Bruno Oliveira 2c4c57e135 Revert fspath deprecation
It is not clear yet how we should proceed with this deprecation
because `pytest.Item.reportinfo` is public API and returns a `py.path` object,
and is not clear how plugins and our examples should handle that.

Reverting just the deprecation aspect of #8251 so we can get a 7.0.0 release out.

We will reintroduce the deprecation later once we have a clear path moving forward with replacing `reportinfo`.

Closes #8445
Closes #8821
2021-07-13 08:24:39 -03:00
pytest bot b6648219ec [automated] Update plugin list 2021-07-11 00:08:26 +00:00
Adam J. Stewart 17f1a0af8e
Fix in more places, use default 2021-07-08 12:43:10 -05:00
Sören Wegener 6740fb9da6
doc: Typofix in fixtures how-to (#8860) 2021-07-06 14:31:21 +00:00
Florian Bruhin 953fdabaf0 Adjust doc links for new scheme
Closes #8831
2021-07-06 09:11:35 +02:00
Florian Bruhin 8347b59295
Update remaining 7.0 references (#8834) 2021-07-04 10:27:43 +02:00
Srip 9cdb7223b5
doc: Adding the missing sys import (#8819) (#8827)
Co-authored-by: Sripradha Karkala <sripradha.karkala@nutanix.com>
2021-06-30 08:11:20 +02:00
Florian Bruhin ba1ad7d517
Opt-out from regendoc for problematic example (#8810)
* Opt-out from regendoc for problematic example

See #8807

* Add comment
2021-06-28 17:47:49 +00:00
Srip 6573107b97
doc: Adding exit code for pytest usage examples (#8790) (#8800)
* doc: Adding exit code for pytest usage examples (#8790)

Fix #8790 

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Co-authored-by: Sripradha Karkala <sripradha.karkala@nutanix.com>
2021-06-27 13:29:16 +00:00
pytest bot f0e5640497 [automated] Update plugin list 2021-06-27 00:08:04 +00:00
Florian Bruhin cb1dba0489
doc: Add new open trainings (#8793) 2021-06-24 20:21:22 +02:00
Ronny Pfannschmidt d7b0e17205
issue a warning when Item and Collector are used in diamond inheritance (#8447)
* issue a warning when Items and Collector form a diamond

addresses #8435

* Apply suggestions from code review

Co-authored-by: Ran Benita <ran@unusedvar.com>

* Return support for the broken File/Item hybrids

* adds deprecation
* ads necessary support code in node construction

* fix incorrect mypy based assertions

* add docs for deprecation of Item/File inheritance

* warn when a non-cooperative ctor is encountered

* use getattr instead of cast to get the class __init__ for legacy ctors

* update documentation references for node inheritance

* clean up file+item inheritance test

enhance docs
move import upwards

Co-authored-by: Ran Benita <ran@unusedvar.com>
2021-06-24 11:45:32 +02:00
James Bourbeau 942789bace
Fix API links in 'How to capture warnings' documentation page (#8792) 2021-06-23 19:34:48 +00:00
Florian Bruhin e44300de7e
doc: Add history page (#8784)
Based on #8667
2021-06-23 20:26:08 +02:00
Bruno Oliveira 7eb0792cba Add pytest.version_tuple
This adds `pytest.version_tuple`, which makes it simpler for users to do something depending on the pytest version, such as declaring hooks which are introduced in later versions.

This feature was added originally in https://github.com/pypa/setuptools_scm/pull/475.

Followup to https://github.com/pytest-dev/pytest/pull/7605.
2021-06-14 09:04:14 -03:00
pytest bot 5ea541d415 [automated] Update plugin list 2021-06-13 00:10:04 +00:00
Bruno Oliveira c85b21eaa0 Remove outdated docs about pytest.warns and DeprecatedWarning
Since #2908, the user doesn't need to set warning filters to capture
`DeprecationWarning` with `pytest.warns`.

Fix #8666
2021-06-12 12:09:26 -03:00
Bruno Oliveira fb7e36b2f7
Merge pull request #8735 from pytest-dev/update-plugin-list/patch-8300b266a
[automated] Update plugin list
2021-06-12 10:49:02 -03:00
Jason Haugen 479209bde1 Fix typo in fixture.rst
Example referenced the wrong function name
2021-06-09 15:13:48 -07:00
pytest bot 50b166ff0b [automated] Update plugin list 2021-06-06 00:17:08 +00:00
Dominic Davis-Foster 7fb5a9d033
Fix typo (setupttools -> setuptools) 2021-06-05 16:03:59 +01:00
Florian Bruhin 9ad726a9a0
Switch to irc.libera.chat (#8722) 2021-06-01 17:34:29 +02:00
Bruno Oliveira 360ce686f1
Merge pull request #8713 from pytest-dev/update-plugin-list/patch-43faea832
[automated] Update plugin list
2021-05-31 10:54:38 -03:00
Denis Laxalde cf7425d22b Fix a typo in documentation about tmpdir_factory
The section refers to tmpdir_factory, but the sentence mentionned
tmp_path_factory.
2021-05-31 09:36:18 +02:00
pytest bot 4b7d8b2edd [automated] Update plugin list 2021-05-30 00:23:19 +00:00
Bruno Oliveira 43faea832d
Merge pull request #8704 from offbyone/doc-getting-started-test-instance
Make the test class instance behaviour clearer
2021-05-26 18:42:37 -03:00
MapleCCC 627b446252 Fix cyclic links in goodpractices.rst 2021-05-27 04:33:49 +08:00
Chris Rose 640b2c0e13 Make the test class instance behaviour clearer
In the "Getting Started" doc, the test class instance example for
instance sharing doesn't actually demonstrate anything about the
reinstantiation of the class. This change shows clearly how the instance
data isn't retained between test runs.
2021-05-26 09:12:29 -07:00
Florian Bruhin 1d5ee4dd7c
doc: Remove training sidebar (#8701) 2021-05-26 14:15:00 +02:00
Ran Benita 1ba5b48565
Merge pull request #8697 from bluetech/expose-config
config: expose Config and PytestPluginManager for typing purposes
2021-05-26 11:20:42 +03:00
Ran Benita 1b5f5326d7
Merge pull request #8695 from bluetech/export-parser
argparsing: export Parser and OptionGroup for typing purposes
2021-05-26 11:20:03 +03:00
Ran Benita 9719237fe6 doc: refer to type by its public name 2021-05-24 12:31:28 +03:00
Ran Benita c0d525e44c config: expose PytestPluginManager for typing purposes
This type is used in hooks and transitively through `Config`.
2021-05-24 12:27:07 +03:00
Ran Benita 88d84a5791 config: expose Config for typing purposes
This type is used in hooks and fixtures.

The constructor is publicly documented so is not marked private.
2021-05-24 12:26:22 +03:00
Ran Benita 538b5c2499 argparsing: export Parser and OptionGroup for typing purposes
`Parser` is used by many plugins and custom hooks. `OptionGroup` is
exposed by the `parser.addgroup` API.

The constructors of both are marked private, they are not meant to be
constructed directly.
2021-05-24 00:52:03 +03:00
pytest bot 11538e35e4 [automated] Update plugin list 2021-05-23 00:12:33 +00:00
Zac Hatfield-Dodds c198a7a67e
Merge pull request #8677 from olgarithms/warns-no-arg-catches-any 2021-05-19 17:47:39 +10:00
pytest bot a69ed66c2e [automated] Update plugin list 2021-05-16 00:10:52 +00:00
Olga Matoula 8b2f83772d Catch any warning on warns with no arg passed 2021-05-15 18:50:39 +01:00
Ran Benita 364bbe42fc
Merge pull request #8649 from Saiprasad16/main
UPDATE LICENSE
2021-05-13 17:34:18 +03:00
pytest bot e0a3dc7bf8 [automated] Update plugin list 2021-05-09 00:05:23 +00:00
Saiprasad Kale 337a729d95
Update license.rst 2021-05-08 23:45:20 +05:30
Saiprasad Kale 6b53714d57
Update conf.py 2021-05-08 23:43:33 +05:30
Ross Vandegrift 124691122a
Expand command line argument examples with validation examples (#8610)
* Expand command line argument examples with validation examples

This shows how to pass more detailed error messages back to the user when
they've provided an incorrect value for a custom command line option.

* [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>
2021-05-07 10:48:46 +03:00
Anthony Sottile 915ff7640b Merge pull request #8632 from pytest-dev/release-6.2.4
Prepare release 6.2.4

(cherry picked from commit 15a45388fa272fde7b2b58254ca32c4998cb84f0)
2021-05-04 09:27:16 -07:00
alshapton 4e048e0827
8625 - small grammar fix (#8627) 2021-05-03 20:42:23 +00:00
pytest bot 8f49ffdb57 [automated] Update plugin list 2021-05-02 00:12:49 +00:00
Nico Schlömer 9ef608ef76
"fix" a couple of http -> https redirects
Found with
urli-fix . -a http: -i pytest
2021-04-26 17:44:27 +02:00
pytest bot 788d445b7b [automated] Update plugin list 2021-04-25 00:20:16 +00:00
Ran Benita 4764c85275
Merge pull request #8570 from soxofaan/main
Logging docs: fix reference to pytest.LogCaptureFixture.
2021-04-20 16:42:54 +03:00
Ran Benita e5292ed8dc
Merge pull request #8561 from pytest-dev/update-plugin-list/patch-9078c3c
[automated] Update plugin list
2021-04-20 16:26:23 +03:00
Stefaan Lippens 7e82f6fc38 Logging docs: fix reference to pytest.LogCaptureFixture. 2021-04-20 15:21:30 +02:00
Miroslav Šedivý fbe66244b8
Fix some typos, remove redundant words and escapes (#8564)
* doc: Fix typos, remove double words

* Remove redundant escapes in regex
2021-04-19 20:39:08 +00:00
pytest bot c117bc350e [automated] Update plugin list 2021-04-18 00:18:53 +00:00
Abdelrahman Elbehery 9078c3ce23
fix #8464 wrong root dir when -c is passed (#8537)
fix #8464 wrong root dir when -c is passed
2021-04-16 14:38:35 -03:00
Florian Bruhin d2f3d40510
doc: Update open trainings (#8551) 2021-04-15 19:09:06 +02:00
Ran Benita 8dd64622ca
Merge pull request #8538 from pytest-dev/update-plugin-list/patch-9653a0e
[automated] Update plugin list
2021-04-14 12:52:29 +03:00
Albert Villanova del Moral 4b214a6049
Add tmp_path_factory methods to the docs (#8550)
* Add tmp_path_factory methods to the docs

Add the methods of tmp_path_factory to the docs.

Currently, only the class description appears in the docs.

* Add tmpdir_factory methods to the docs
2021-04-14 12:06:35 +03:00
pytest bot 67d61e56e9 [automated] Update plugin list 2021-04-11 00:20:34 +00:00
Ran Benita 9653a0e9f4
Merge pull request #8531 from pytest-dev/graingert-patch-1
fix pytest 6.2.3 #8414 changelog entry grammar
2021-04-10 19:05:19 +03:00
Daniele Procida 70daa279a7
Further rationalised "how to invoke pytest" material. (#8536)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-04-08 21:19:30 -03:00
Thomas Grainger 97a61916a6
fix pytest 6.2.3 #8414 changelog entry grammar 2021-04-08 15:40:58 +01:00
Ronny Pfannschmidt 41a90cd9fe
Merge pull request #8463 from RonnyPfannschmidt/workaround-8361
address #8361 - introduce hook caller wrappers that enable backward compat
2021-04-05 22:50:31 +02:00
Tadeu Manoel b706a2c048
Fix error with --import-mode=importlib and modules containing dataclasses or pickle (#7870)
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>

Fixes #7856, fixes #7859
2021-04-05 17:10:03 -03:00
Ran Benita 43b547a1cb
Merge pull request #8521 from pytest-dev/update-plugin-list/patch-07c6b3f
[automated] Update plugin list
2021-04-04 13:40:37 +03:00
pytest bot f3337c1854 [automated] Update plugin list 2021-04-04 00:19:23 +00:00
Ran Benita 5d2fad5362 Merge pull request #8519 from pytest-dev/release-6.2.3
Prepare release 6.2.3

(cherry picked from commit 724e22cb003031b88ae6fe50fa3eabdcc538a8bc)
2021-04-04 01:08:26 +03:00
Ronny Pfannschmidt 53ebe34ca2
Apply suggestions from code review
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2021-04-03 12:46:50 +02:00
Mehera Emrich 0061ec5555
Fix typo (#8504) 2021-04-01 15:13:12 +02:00
Bruno Oliveira b96e229c95
Fix plugin-list label in the docs (#8505)
Last time I "fixed" this I left a `\` at the start of the string
to avoid an initial newline, but didn't realize it was a raw string.

This should fix it now for good.
2021-04-01 15:12:46 +02:00
Ronny Pfannschmidt bad1963697 fix #8361: address review/quality comments 2021-03-29 22:29:35 +02:00
pytest bot bfdfab00dd [automated] Update plugin list 2021-03-28 00:18:38 +00:00
Bruno Oliveira c1e057065c Fix plugin-list label and script
This was changed during the current docs restructing and
we missed that it changed the label.
2021-03-26 07:13:52 -03:00
Bruno Oliveira be8d63e33b Increase truncation threshold with -v, disable with -vv
Fix #6682
Fix #8403
2021-03-26 07:05:30 -03:00
Bruno Oliveira 9e8a6b6eeb
Merge pull request #8477 from evildmp/evolutionary-documentation-restructure 2021-03-26 06:32:26 -03:00
Daniele Procida a7d528e058 Restructured 'How to invoke pytest' guide 2021-03-22 22:47:13 +00:00
pytest bot 3add1a4d0f [automated] Update plugin list 2021-03-21 00:50:28 +00:00
Ran Benita fe215bda6b
Merge pull request #8446 from bluetech/unnecessary-py-path-2
More py.path removal work
2021-03-18 10:20:59 +02:00