Commit Graph

92 Commits

Author SHA1 Message Date
Ran Benita 99363ad7ff recwarn: fix was -> were in DID NOT WARN message 2021-10-27 08:36:10 +03:00
Oleg Höfling 1e9e16d829
Replace hardcoded links to PyPI with extlinks (#9224) 2021-10-22 09:47:57 -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
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
Ran Benita 4b13b5993e Fix syntax typo in writing_hook_functions.rst 2021-10-01 10:26:56 +03:00
ziebam 520aa61e19 Improve docs for pytester.copy_example 2021-09-22 00:16:52 +02:00
Zac Hatfield-Dodds 8900e3b937
Merge pull request #9041 from hoefling/doc/stdlib-crossrefs 2021-09-07 21:22:24 +10: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
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
Hugo van Kemenade 5ec89fd6e5 Docs: refer to non-deprecated unittest alias 2021-08-18 12:43:59 +03: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
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
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
Thomas Grainger 388691a205
rename tmpdir.rst to tmp_path.rst (#8905) 2021-07-14 12:53:27 -03:00
Bruno Oliveira 828fde1156
Merge pull request #8858 from The-Compiler/update-doc-urls 2021-07-14 09:28:46 -03: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
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
James Bourbeau 942789bace
Fix API links in 'How to capture warnings' documentation page (#8792) 2021-06-23 19:34:48 +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
Ran Benita 9719237fe6 doc: refer to type by its public name 2021-05-24 12:31:28 +03:00
Olga Matoula 8b2f83772d Catch any warning on warns with no arg passed 2021-05-15 18:50:39 +01: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
Stefaan Lippens 7e82f6fc38 Logging docs: fix reference to pytest.LogCaptureFixture. 2021-04-20 15:21:30 +02: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
Bruno Oliveira be8d63e33b Increase truncation threshold with -v, disable with -vv
Fix #6682
Fix #8403
2021-03-26 07:05:30 -03:00
Daniele Procida a7d528e058 Restructured 'How to invoke pytest' guide 2021-03-22 22:47:13 +00:00
Daniele Procida 6ab461f460 Explicitly listed the four documentation sections on index.rst 2021-03-16 20:26:05 +00:00
Daniele Procida 2641761c1c
Merge pull request #8441 from evildmp/evolutionary-documentation-restructure
Moved more sections from reference to how-to.
2021-03-15 10:22:11 +02:00
Ran Benita ba7bd3d77c doc/tmpdir: significantly reduce space dedicated to tmpdir/tmpdir_factory
Emphasize tmp_path/tmp_path_factory and just note the legacy ones.
2021-03-13 20:44:23 +02:00
Ran Benita db539ed2b0
Merge pull request #8437 from bluetech/rm-typevar-prefix
Remove `_` prefix from TypeVars, expose ExceptionInfo
2021-03-13 19:01:29 +02:00
Ran Benita f2d65c85f4 code: export ExceptionInfo for typing purposes
This type is most prominent in `pytest.raises` and we should allow to
refer to it by a public name.

The type is not in a perfectly "exposable" state. In particular:

- The `traceback` property with type `Traceback` which is derived from
  the `py.code` API and exposes a bunch more types transitively. This
  stuff is *not* exported and probably won't be.

- The `getrepr` method which probably should be private.

But they're already used in the wild so no point in just hiding them
now.

The __init__ API is hidden -- the public API for this are the `from_*`
classmethods.
2021-03-13 15:59:44 +02:00
Daniele Procida 8410d9ac54 Created a new Explanation section and new landing pages for main sections.
Added landing pages for:

How-to guides
Reference guides
Explanation

Added links to the main landing pages to the sidebar.
2021-03-12 22:57:53 +00:00
Daniele Procida ff2ee96b8c Split fixtures documentation into separate documents.
Sections have been moved to:

* reference/fixtures.rst
* how-to/fixtures.rst
* fixtures.rst

according to their function. Further refinement and rewriting will be required.

Some material has been moved to a new "Anatomy of a test" document, in
anticipation that material from other sections will also find a natural
home there later.

Removed several unneeded reference targets from fixtures documentation.
2021-03-12 22:16:47 +00:00
Daniele Procida d8695410a4 Added how-to and reference directories.
Moved various documents into subdirectories, how-to and
reference.

Updated multiple links to use `:ref:` instead of `:doc:`,
meaning that files can henceforth be moved around without
breaking references.
2021-03-11 22:13:01 +00:00