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
Thomas Grainger
12efc58479
document deprecation in deprecations.rst
2021-03-19 09:43:22 +00:00
Thomas Grainger
3f71680ac0
Warn when a mark is applied to a fixture
...
Fixes #3664
2021-03-19 09:30:52 +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
Daniele Procida
6ab461f460
Explicitly listed the four documentation sections on index.rst
2021-03-16 20:26:05 +00:00
Daniele Procida
7781582d52
Restructured global TOC
...
* Changed "Table Of Contents" link to a plain heading.
* Removed Customize, API Reference, 3rd party plugins links altogether.
* Added an "About the project" heading
2021-03-15 23:20:55 +00:00
Ran Benita
f0c7043138
Remove/replace some more unnecessary uses of py.path
2021-03-15 10:39:44 +02:00
Ran Benita
a03ee02817
config: make `collect_ignore` accept any PathLike
...
The main reason is to remove a reference to `py.path`.
2021-03-15 10:39:32 +02: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
59251e8a2a
Remove/replace some unneeded usages of py.path
2021-03-14 14:12:28 +02:00
pytest bot
493b54e21e
[automated] Update plugin list
2021-03-14 00:49:15 +00: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
Bruno Oliveira
ef1308c23b
Merge pull request #8407 from nicoddemus/type-annotations-description-8405
...
Add type annotations to the description instead of signature
2021-03-13 14:46:37 -03: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
Ran Benita
639c4e64a1
doc: fix broken links in left-hand TOC
...
Due to recent renamings.
2021-03-13 12:44:30 +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
Bruno Oliveira
4b7edef08f
Merge pull request #8431 from evildmp/evolutionary-documentation-restructure
...
Moved documentation topics to group them by theme.
2021-03-11 16:32:16 -03:00
Daniele Procida
a362200d47
Moved documentation topics to group them by theme.
...
Reordered items in:
* _templates/globaltoc.html
* contents.rst
2021-03-11 17:22:54 +00:00
Ran Benita
2a789b9e3a
Merge pull request #8409 from pytest-dev/update-plugin-list/patch-620e819
...
[automated] Update plugin list
2021-03-11 18:26:12 +02:00
Daniele Procida
d2d975d6cf
Reworded titles of some clear how-to guides
...
Files retitled:
assert.rst
bash-completion.rst
capture.rst
existingtestsuite.rst
mark.rst
monkeypatch.rst
nose.rst
parametrize.rst
plugins.rst
skipping.rst
tmpdir.rst
usage.rst
2021-03-10 20:26:06 +00:00
Daniele Procida
4a19533ba5
Renamed Install to Getting started; moved notes to index
2021-03-10 19:20:32 +00:00
Ronny Pfannschmidt
dbed1ff68f
adopt main terminology in the configs
...
ref pytest-dev/meta#8
2021-03-09 22:35:34 +01:00
Anthony Sottile
7a6ec5616d
clean up mkdtemp usage
...
Committed via https://github.com/asottile/all-repos
2021-03-08 19:12:08 -08:00
Bruno Oliveira
fc651fb158
Merge pull request #8251 from RonnyPfannschmidt/pathlib-node-path
2021-03-07 11:10:07 -03:00
pytest bot
f0ad73c4b0
[automated] Update plugin list
2021-03-07 00:48:50 +00:00
Florian Bruhin
620e819656
Add enterPy training ( #8396 )
2021-03-06 22:59:33 +01:00
Ronny Pfannschmidt
22dad53a24
implement Node.path as pathlib.Path
...
* reorganize lastfailed node sort
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2021-03-06 21:32:03 +01:00
Bruno Oliveira
7c792e96c6
Add type annotations to the description instead of signature
...
This configures Sphinx autodoc to include the type annotations
along with the description of the function/method, instead of including
it into the signature.
Fix #8405
2021-03-05 22:22:53 -03:00
Florian Bruhin
c14a9adba3
Fix skip signature ( #8392 )
...
* Fix test_strict_and_skip
The `--strict` argument was removed in #2552 , but the removal wasn't
actually correct - see #1472 .
* Fix argument handling in pytest.mark.skip
See #8384
* Raise from None
* Fix test name
2021-03-04 11:56:21 +01:00
pytest bot
a623b1b086
[automated] Update plugin list
2021-02-28 00:48:46 +00:00
Florian Bruhin
9d09d19911
Fix typo in changelog
...
See #7143
2021-02-23 18:03:10 +01:00
pytest bot
56421aed01
[automated] Update plugin list
2021-02-21 00:46:01 +00:00
Feanil Patel
e6012612b9
Remove a redundant paragraph
...
doc This paragraph looks like it is a more verbose version of the sentence right above it. Removing it doesn't reduce the amount of information here but does make the section flow a little better.
2021-02-19 13:46:29 -05:00
Vincent Poulailleau
565fe0fb7d
Update number of plugins
...
According to the source, there are 801 plugins now!
2021-02-18 15:27:39 +01:00
maskypy40
532543b4ef
Remove empty lines from code-block
...
In assert.rst at line 175 and further there is an example of an assert encountering comparisons. The code-block for this example starts with a comment (line 177) and then it has 2 empty lines. Comparing this example code (test_assert2.py) with the previously mentioned example code on the same page (i.e. test_assert1.py) you can see that there should not be 2 empty lines after the comment. These 2 empty lines are removed.
2021-02-17 09:33:04 +01:00
pytest bot
a0ae5fd652
[automated] Update plugin list
2021-02-14 00:45:06 +00:00
pytest bot
3c6bd7eb27
[automated] Update plugin list
2021-02-07 00:44:13 +00:00
Florian Bruhin
c604f3f0c5
doc: Remove confusing fixture sentence
...
There is no previous `test_ehlo` example (it follows much later) - and the same thing is described further down in ""Requesting" fixtures" already.
2021-02-05 17:47:37 +01:00
pytest bot
16af1a31fd
[automated] Update plugin list
2021-02-05 00:24:50 +00:00
Ran Benita
b3115c1b06
Merge pull request #8315 from bluetech/parser-proper-deprecation
...
config/argparsing: use proper deprecations instead of ad-hoc DeprecationWarning
2021-02-05 00:37:38 +02:00
Ran Benita
d358a060ad
config/argparsing: use proper deprecations instead of ad-hoc DeprecationWarning
...
Proper for removing this in the next major pytest release.
2021-02-05 00:05:47 +02:00
Bruno Oliveira
bebb6953eb
Merge pull request #8312 from matthewhughes934/add-regendoc-runs-for-fixture-docs
2021-02-04 15:50:48 -03:00
Matthew Hughes
709c211e68
Run regendoc over fixture docs
...
This is the result of running:
$ cd doc/en && make regen REGENDOC_FILES=fixture.rst
2021-02-04 18:32:52 +00:00
Matthew Hughes
97cfd66806
Add regendoc runs for emaillib tests in fixture
...
Also update these tests ensure they pass, and be explicit about the test
file called in an existing test to avoid unintentional calls to the
added tests
2021-02-04 18:32:28 +00:00
Bruno Oliveira
287bab09a4
Merge pull request #8314 from pytest-dev/update-plugin-list/patch-275174e
...
[automated] Update plugin list
2021-02-04 11:54:29 -03:00
Florian Bruhin
b77f071bef
doc: Remove past training
2021-02-04 11:40:28 +01:00
Ran Benita
3907856cb3
Merge pull request #8297 from pytest-dev/monkeypatch-docs
...
doc: Point out two-argument form of monkeypatch.setattr
2021-02-04 10:13:27 +02:00
pytest bot
1d895dd46c
[automated] Update plugin list
2021-02-04 00:26:06 +00:00
Matthew Hughes
298541f540
Add basic emaillib for tests in fixture.rst
...
This will be used to power regendoc runs for later tests
2021-02-03 13:14:31 +00:00
Matthew Hughes
100c8deab5
Fix various typos in fixture docs
2021-02-03 13:14:31 +00:00
pytest bot
3165b1e323
[automated] Update plugin list
2021-02-02 00:31:11 +00:00
bluetech
de06f468ed
[automated] Update plugin list
2021-01-30 00:30:28 +00:00
Florian Bruhin
f0f19aa8d9
doc: Point out two-argument form of monkeypatch.setattr
...
See the "for convenience" part here: https://docs.pytest.org/en/stable/reference.html#pytest.MonkeyPatch.setattr
2021-01-29 21:08:37 +01:00
Maximilian Cosmo Sitter
beda7a8a31
Add plugin list
2021-01-29 16:19:54 +02:00
Bruno Oliveira
7b4ee65bdc
Merge pull request #8284 from encukou/patch-1
...
Doc: Fix typo
2021-01-27 09:40:55 -03:00
Petr Viktorin
56cea26445
Doc: Fix typo
2021-01-27 10:23:18 +01:00
Hong Xu
8bb3977cb6
Doc: Move the module declaration to index.rst
...
When the declaration stays in reference.rst, it creates duplicated
"pytest" symbols such as `pytest.pytest.mark.filterwarnings`.
2021-01-26 00:48:01 -08:00
Christian Steinmeyer
781b73bb52
Mention that class variables are shared between tests
...
Close #8252
2021-01-25 12:02:59 -03:00
Bruno Oliveira
2a890286f8
Merge pull request #8275 from pytest-dev/release-6.2.2
...
Prepare release 6.2.2
(cherry picked from commit 8220eca963472e7918ef7e108bdc1cd8ed155a4a)
2021-01-25 11:53:05 -03:00
Jeff Widman
eef2d1a8e2
Fix pep8 import order in docs ( #8253 )
2021-01-19 11:45:45 -03:00
Ran Benita
25e657bfc1
Deprecate raising unittest.SkipTest to skip tests during collection
...
It is not very clear why this code exists -- we are not running any
unittest or nose code during collection, and really these frameworks
don't have the concept of collection at all, and just raising these
exceptions at e.g. the module level would cause an error. So unless I'm
missing something, I don't think anyone is using this.
Deprecate it so we can eventually clear up this code and keep unittest
more tightly restricted to its plugin.
2021-01-15 00:05:33 +02:00
Gergely Imreh
80c33c8178
Add missing import into example script in documentation
2021-01-08 11:43:51 +00:00
Florian Bruhin
65b8391ead
doc: Add note about training early bird discount
2021-01-05 19:39:50 +01:00
Bruno Oliveira
329fff69a3
Merge pull request #8220 from xuhdev/module-doc
...
DOC: Mark pytest module
2021-01-05 13:25:02 -03:00
Hong Xu
14b5f5e528
DOC: Mark pytest module
...
Pytest document currently does not index the top-level package name
`pytest`, which causes some trouble when building documentation that
cross-refers to the pytest package via ``:mod:`pytest` ``.
2021-01-02 00:34:52 -08:00
Hong Xu
b02f1c8ae7
DOC: Update multiple references to testdir to pytester
...
In https://docs.pytest.org/en/stable/reference.html#testdir , it is
suggested:
> New code should avoid using testdir in favor of pytester.
Multiple spots in the documents still use testdir and they can be quite
confusing (especially the plugin writing guide).
2021-01-01 12:21:39 -08:00
mefmund
5f11a35b99
Add missing fixture ( #8207 )
...
Co-authored-by: Florian Bruhin <me@the-compiler.org>
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-12-31 15:25:44 -03:00
pre-commit-ci[bot]
ee03e31831
[pre-commit.ci] pre-commit autoupdate ( #8201 )
...
* [pre-commit.ci] pre-commit autoupdate
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* manual fixes after configuration update
* [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: Anthony Sottile <asottile@umich.edu>
2020-12-30 11:56:09 +02:00
Ran Benita
96ea867fec
runner: export pytest.CallInfo for typing purposes
...
The type cannot be constructed directly, but is exported for use in type
annotations, since it is reachable through existing public API.
This also documents `from_call` as public, because at least
pytest-forked uses it, so we must treat it as public already anyway.
2020-12-26 21:38:37 +02:00
Ran Benita
bd76042344
python: export pytest.Metafunc for typing purposes
...
The type cannot be constructed directly, but is exported for use in type
annotations, since it is reachable through existing public API.
2020-12-26 21:05:02 +02:00
Ran Benita
5e323becb7
Revert "doc: temporary workaround for pytest-pygments lexing error"
...
Support was added in pytest-pygments 2.2.0.
This reverts commit 0feeddf8ed
.
2020-12-22 21:15:27 +02:00
Ran Benita
6aa4d1c7ab
mark: export pytest.MarkGenerator for typing purposes
...
The type cannot be constructed directly, but is exported for use in type
annotations, since it is reachable through existing public API.
2020-12-20 15:59:20 +02:00
Ran Benita
69c302479e
mark: export pytest.MarkDecorator for typing purposes
...
The type cannot be constructed directly, but is exported for use in type
annotations, since it is reachable through existing public API.
2020-12-20 15:59:06 +02:00
Ran Benita
2ec372df8b
mark: export pytest.Mark for typing purposes
...
The type cannot be constructed directly, but is exported for use in type
annotations, since it is reachable through existing public API.
2020-12-20 15:58:49 +02:00
Chris NeJame
534d174fd2
Clarify fixture execution order and provide visual aids ( #7381 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Co-authored-by: Ran Benita <ran@unusedvar.com>
2020-12-16 13:53:14 -03:00
Bruno Oliveira
cab16f3aac
Use transparent PNG for logo ( #8159 )
2020-12-16 11:19:45 -03:00
Bruno Oliveira
56600414df
Merge pull request #8149 from pytest-dev/release-6.2.1
...
Prepare release 6.2.1
(cherry picked from commit a566eb9c7085d7732127420bd7ce5ec1f7319fba)
2020-12-15 12:41:02 -03:00
Ran Benita
54a7356a9f
Merge pull request #8130 from pytest-dev/release-6.2.0
...
Prepare release 6.2.0
(cherry picked from commit c475106f12ed87fe908544ff383c5205638c086d)
2020-12-12 23:23:19 +02:00
Ran Benita
0feeddf8ed
doc: temporary workaround for pytest-pygments lexing error
...
pytest-pygments doesn't yet recognize the skip reason in summary line
added recently. Workaround it until we get to updating it.
2020-12-12 22:18:23 +02:00
Bruno Oliveira
68a0f22eee
Merge pull request #8100 from nicoddemus/doctest-alternatives
...
List pytest-doctestplus in doctest docs
2020-12-05 17:42:09 -03:00
Ran Benita
e398c93884
Merge pull request #8055 from bluetech/unraisable
...
Add unraisableexception and threadexception plugins
2020-12-05 21:52:17 +02:00
Ran Benita
760a73c08c
Merge pull request #8017 from bluetech/typing-public-fixtures
...
Export types of builtin fixtures for type annotations
2020-12-05 21:51:20 +02:00
Bruno Oliveira
4fc20c8d28
List pytest-doctestplus in doctest docs
...
As per https://github.com/pytest-dev/pytest/discussions/8088
2020-12-04 15:24:56 -03:00
Shubham Adep
d1cb9de211
Custom multiple marker execution order ( #8065 )
...
* Custom multiple marker execution order
https://github.com/pytest-dev/pytest/issues/8020 issue stated that ordering of multiple custom markers is from inside - out. I have added example for the same in the documentation. Please let me know for further changes / concerns.
* remove trailing spaces
The last commit was failing due to extra spaces
* Ran tox tests locally to debug white space trimming issues
* Resolve: ERROR: docs: commands failed for tox -e docs
* Update doc/en/reference.rst
Committed PR suggestions.
Co-authored-by: Florian Bruhin <me@the-compiler.org>
* Added reference to Node.iter_markers_with_node in documentation
* Add myself to Authors
Co-authored-by: Shubham <shubham.adep@wsu.edu>
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2020-11-30 16:48:08 +01:00
Prakhar Gurunani
3405c7e6a8
Add more info about skipping doctests ( #8080 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-11-28 12:47:02 -03:00
Ran Benita
d50df85e26
Add unraisableexception and threadexception plugins
2020-11-21 21:11:48 +02:00
Maximilian Cosmo Sitter
0cef530d10
Add str() support to LineMatcher ( #8050 )
2020-11-21 20:45:20 +02:00
Tim Hoffmann
afd53ede6f
Link mentioned functions instead of using literals ( #8045 )
2020-11-19 15:44:59 +01:00
Florian Bruhin
c6ac618baf
Fix nose documentation
...
Follow-up to #8048 which seems to have been merged without the suggested changes.
2020-11-19 13:54:40 +01:00
mickeypash
ce825ed16c
Add small section on migrating from nose to pytest
...
The section currently features the nose2pytest tool with plans to expand
on some of the common gotchas when performing such migrations.
2020-11-19 08:50:11 -03:00
Ran Benita
f1e6fdcddb
Export types of builtin fixture for type annotations
...
In order to allow users to type annotate fixtures they request, the
types need to be imported from the `pytest` namespace. They are/were
always available to import from the `_pytest` namespace, but that is
not guaranteed to be stable.
These types are only exported for the purpose of typing. Specifically,
the following are *not* public:
- Construction (`__init__`)
- Subclassing
- staticmethods and classmethods
We try to combat them being used anyway by:
- Marking the classes as `@final` when possible (already done).
- Not documenting private stuff in the API Reference.
- Using `_`-prefixed names or marking as `:meta private:` for private
stuff.
- Adding a keyword-only `_ispytest=False` to private constructors,
warning if False, and changing pytest itself to pass True. In the
future it will (hopefully) become a hard error.
Hopefully that will be enough.
2020-11-13 11:25:09 +02:00
Adam Johnson
39b2706f6a
Add 'node_modules' to norecursedirs
...
Fixes #8023 .
2020-11-11 01:52:18 +00:00
Ran Benita
e986d84466
Merge pull request #8006 from bluetech/export-MonkeyPatch
...
Export MonkeyPatch as pytest.MonkeyPatch
2020-11-09 11:45:38 +02:00
Ran Benita
6f13d1b03b
Export MonkeyPatch as pytest.MonkeyPatch
...
We want to export `pytest.MonkeyPatch` for the purpose of
type-annotating the `monkeypatch` fixture. For other fixtures we export
in this way, we also make direct construction of them (e.g.
`MonkeyPatch()`) private. But unlike the others, `MonkeyPatch` is also
widely used directly already, mostly because the `monkeypatch` fixture
only works in `function` scope (issue #363 ), but also in other cases. So
making it private will be annoying and we don't offer a decent
replacement yet.
So, let's just make direct construction public & documented.
2020-11-09 11:28:15 +02:00
Hugo Martins
5b2e5e8a40
Improve summary stats when using '--collect-only' ( #7875 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-11-08 11:45:10 -03:00
frankgerhardt
9bc633064b
Capitalize headlines ( #8008 )
2020-11-07 22:44:04 -03:00
Ran Benita
4c0513bc18
fixtures: deprecate pytest.yield_fixture()
2020-11-07 17:06:40 +02:00
Bruno Oliveira
30287b49cd
Deprecate --strict ( #7985 )
...
Fix #7530
2020-11-06 09:48:20 +01:00
Bruno Oliveira
2753859ff0
Merge pull request #7979 from nicoddemus/metafunc-ref
...
Add FunctionDefinition to the reference docs
2020-10-31 10:00:48 -03:00
Bruno Oliveira
569c091769
Add FunctionDefinition to the reference docs
...
Fix #7968
2020-10-31 08:45:34 -03:00
Bruno Oliveira
0c7233032f
Manually add the remaining 4.6.x release notes to the changelog
...
Fix #7967
2020-10-31 08:36:26 -03:00
Bruno Oliveira
b95991aeea
Merge pull request #7960 from nicoddemus/cherry-pick-release
...
Merge pull request #7958 from pytest-dev/release-6.1.2
2020-10-28 14:36:37 -03:00
Bruno Oliveira
5711ced250
Merge pull request #7958 from pytest-dev/release-6.1.2
...
Prepare release 6.1.2
(cherry picked from commit 1ed903e8fcbe60f8ce25b8911641059cd89d892b)
2020-10-28 14:23:09 -03:00
Gustavo Camargo
b308c6ddb3
Update doctest.rst
2020-10-26 14:30:00 -05:00
Emiel van de Laar
0d9e27a363
doc: Remove unused imports in examples ( #7924 )
...
The "os" imports in the `tmp_path` and `tmpdir` fixture examples are
unused and thus have been removed to prevent confusion.
2020-10-23 17:31:17 +03:00
Matthias Gabriel
e8504e04f3
Fix small typo in reference.rst ( #7922 )
...
Co-authored-by: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
2020-10-22 07:11:49 -03:00
Hugo van Kemenade
a642650e17
Drop support for EOL Python 3.5
2020-10-19 10:02:36 +03:00
Bruno Oliveira
0a258f534f
Fix linting
2020-10-17 08:42:15 -03:00
Bruno Oliveira
f58d0a8c3d
Merge pull request #7903 from ekrecker/patch-1
...
Fix typos
2020-10-17 08:41:10 -03:00
Nimesh Vashistha
991bc7bd50
Added note to writing_plugins.rst ( #7896 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-10-17 08:26:30 -03:00
kwgchi
fc70fd23a2
Fix typos
2020-10-16 21:29:58 +09:00
Bruno Oliveira
b4c28dcaa2
Merge pull request #7893 from nicoddemus/testdir-docs-7892
...
List Testdir members in the docs
2020-10-14 10:34:49 -03:00
Prashant Sharma
5182c73fea
Add example for registering multiple custom mark ( #7886 )
2020-10-14 15:17:50 +03:00
Bruno Oliveira
3cae145e41
List Testdir members in the docs
...
Also include docstrings pointing to the counterparts in Pytester.
Fix #7892
2020-10-13 12:01:11 -03:00
Bruno Oliveira
69419cb700
New pytester fixture ( #7854 )
2020-10-12 12:13:06 -03:00
William Jamir Silva
703e89134c
Update reference.rst informing the default junit_family ( #7860 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-10-05 14:04:37 -03:00
Anthony Sottile
f81c6c00a9
Merge pull request #7852 from asottile/py36_pyupgrade
...
py36+: pyupgrade: py36+
2020-10-04 08:25:32 -07:00
Anthony Sottile
66bd44c13a
py36+: pyupgrade: py36+
2020-10-03 12:46:54 -07:00
Ran Benita
fd74dd3dcb
Merge pull request #7849 from pytest-dev/release-6.1.1
...
Prepare release 6.1.1
(cherry picked from commit 69d903260d39f50ef7233348e1521000710cc5ba)
2020-10-03 22:38:33 +03:00
Ran Benita
7705e5e624
doc: patch Sphinx to detect our `@final` for marking classes as `final`
...
Thanks to Dominic Davis-Foster for code & assistance.
2020-10-03 13:13:14 +03:00
Anthony Sottile
ac189885f6
Merge pull request #7835 from asottile/py36_misc
...
py36+: miscellaneous (3, 6) cleanup
2020-10-02 19:47:35 -07:00
Anthony Sottile
6ba13ed528
Merge pull request #7834 from asottile/py36_TYPE_CHECKING
...
py36+: remove TYPE_CHECKING from _pytest.compat
2020-10-02 19:47:27 -07:00
Anthony Sottile
284fd45a08
py36+: miscellaneous (3, 6) cleanup
2020-10-02 15:04:16 -07:00
Anthony Sottile
a238d1f37d
py36+: remove TYPE_CHECKING from _pytest.compat
...
automated with:
```bash
git grep -l 'from .* import TYPE_CHECKING' |
xargs reorder-python-imports \
--application-directories .:src \
--remove-import 'from _pytest.compat import TYPE_CHECKING' \
--add-import 'from typing import TYPE_CHECKING'
```
2020-10-02 15:03:24 -07:00
Anthony Sottile
3c93eb0f04
py36+: remove pathlib2 compatibility shim
2020-10-02 14:59:07 -07:00
Max Voitko
cb0a13a523
Fix minor typos in doctest.rst ( #7828 )
2020-10-02 15:39:15 +02:00
Ran Benita
f324b27d02
Merge pull request #7748 from nicoddemus/fix-plugin-order-docs
...
Improve docs about plugin discovery/loading at startup
2020-09-27 13:19:58 +03:00
Ran Benita
19c78ab574
Merge pull request #7797 from pytest-dev/release-6.1.0
...
Prepare release 6.1.0
(cherry picked from commit 08a1ab3a8acdfdeffd8f07058b44743df1d90150)
2020-09-26 21:11:48 +03:00
Kamran Ahmad
d3f47bf346
Improved 'Declaring new hooks' section in docs. ( #7782 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-09-23 11:15:55 -03:00
Bruno Oliveira
7324e90199
Update doc/en/writing_plugins.rst
...
Co-authored-by: Ran Benita <ran@unusedvar.com>
2020-09-19 16:14:28 -03:00
Bruno Oliveira
cdfdb3a25d
Add docs about reusing fixtures from other projects ( #7772 )
...
Co-authored-by: Ran Benita <ran@unusedvar.com>
2020-09-19 16:10:22 -03:00
Bruno Oliveira
98608c439f
Merge pull request #7760 from finn0/docs/punctuation-mark
...
[Docs] remove semi-colon punctuation mark
2020-09-16 12:42:20 -03:00
Faris A Chugthai
9ceb4e6efc
Mistyped was mistyped ( #7762 )
2020-09-16 12:18:03 +02:00
Vipul Kumar
7470270f20
[Docs] remove semi-colon punctuation mark
...
Usually, we use semi-colon punctuation mark to connect closely related
ideas. Sentences which are after semicolon, begins with small letter,
and last sentence always ends with a period mark, see "Garner's Modern
American Usage" book for more information about usage of punctuation
mark. So removing punctuation mark altogether is a good idea, as
@gnikonorov suggested [1].
[1]: https://github.com/pytest-dev/pytest/pull/7760#pullrequestreview-489232607
2020-09-16 06:17:17 +00:00
Faris A Chugthai
cdf2024070
Update writing_plugins.rst ( #7757 )
...
Capitalize the first word in a sentence and add a period at the end.
2020-09-15 16:41:27 +02:00
Bruno Oliveira
4b46db8ae5
Add full command-line flags to the reference docs
...
Fix #7728
2020-09-14 13:42:06 -03:00
Bruno Oliveira
541b30a044
Improve docs about plugin discovery/loading at startup
...
Fix #7691
2020-09-12 14:11:43 -03:00
Ran Benita
e0dd2111a0
Merge pull request #7720 from pytest-dev/release-6.0.2
...
Prepare release 6.0.2
(cherry picked from commit fe69bd5baf6b8d1713e16caffc7a5e8dab63bc0f)
2020-09-12 02:05:47 +03:00
Ran Benita
78ed3e48db
Merge pull request #7729 from bluetech/doc-fix-crossrefs
...
doc: fix a few broken cross references
2020-09-11 12:44:29 +03:00
Joseph Lucas
6ae0f741ef
Add example for __test__ ( #7733 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-09-09 10:33:39 -03:00
Ran Benita
e503c9a9f8
doc: fix broken cross references
2020-09-06 19:06:43 +03:00
Florian Bruhin
5bdfd719e6
doc: Remove Workshoptage training
...
The sign-up is closed.
2020-09-05 18:11:23 +02:00
Sorin Sbarnea
1df2471f17
Make min duration configurable for slowest tests ( #7667 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-09-05 09:18:29 -03:00
Bruno Oliveira
54f7a87ea8
Merge pull request #7714 from bluetech/doc-prefer-public
...
doc: prefer to reference by public name when possible
2020-09-04 20:39:03 -03:00
Ran Benita
0ca2327069
doc: prefer to reference by public name when possible
...
When a name is exported from `pytest`, prefer to refer to it by that
rather than its `_pytest` import path. It is shorter and more
appropriate in user-facing documentation (although that's not really
visible).
Our plan is to expose more names for typing purposes, in which can this
could be more comprehensive.
2020-09-04 20:46:15 +03:00
Ran Benita
48a8c373a0
doc/reference: include PluginManager in PytestPluginManager and remove it
...
Before, `PluginManager` was a copy of the pluggy doc, and
`PytestPluginManager` was documented separately.
pytest users only really need to know about `PytestPluginManager`, so
instead of splitting have the `PytestPluginManager` documentation
include all of `PluginManager` members and remove `PluginManager` from
the reference (it is still shown as the base class).
2020-09-04 20:14:39 +03:00
Ran Benita
a346028006
config: add Config.{rootpath,inipath}, turn Config.{rootdir,inifile} to properties
2020-09-04 18:04:25 +03:00
Bruno Oliveira
ceea6000ba
Add missing File reference to the docs
...
As related in #7696
2020-08-28 08:49:22 -03:00
Florian Bruhin
00996adeb8
Update talks/trainings page ( #7661 )
...
* Update talks/trainings page
- Remove past webinar
- Add new open training
- Add some talks/webinars by Oliver Bestwalter and by me
- Remove some stale link targets
* Move sidebar to index
2020-08-25 17:02:33 +02:00
Bruno Oliveira
7605150eaa
Move --no-print-logs removal notice to 'Removed Features'
2020-08-19 08:14:28 -03:00
Bruno Oliveira
ef946d557c
Remove resultlog plugin
2020-08-19 08:14:28 -03:00
Bruno Oliveira
52b0cc4f19
Remove broken pytest_collect_directory hook
2020-08-19 08:14:25 -03:00
Bruno Oliveira
457d351941
Remove deprecated TerminalReporter.writer property
2020-08-19 08:13:34 -03:00
Bruno Oliveira
345a59dd53
Add note about pytest.collect deprecation
2020-08-19 08:13:06 -03:00
Bruno Oliveira
6ecbd008c4
Change junit_family default to xunit2
2020-08-19 08:13:06 -03:00
Bruno Oliveira
73e06373dc
Hard failure when constructing Node subclasses
2020-08-19 08:13:03 -03:00
Bruno Oliveira
c747dc5248
Drop support for positional arguments in @pytest.fixture
2020-08-19 08:11:42 -03:00
Bruno Oliveira
98530184a5
Remove funcargnames compatibility property
2020-08-19 08:11:39 -03:00
Thomas Grainger
02c6e4455c
document toml use of filterwarnings ( #7611 )
...
and include a demo of toml 'literal strings'
Update doc/en/warnings.rst
Apply suggestion by Ran
Fix linting
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-08-14 10:08:17 +03:00
Maximilian Cosmo Sitter
15d8293241
Remove faq.rst from docs ( #7635 )
2020-08-12 14:47:34 -03:00
Sam Estep
a27c539a85
Fix typos in Ali Afshar's name
...
The correct name is visible in the Bitbucket link.
2020-08-07 15:22:10 -07:00
Rüdiger Busche
a64298ff5e
Document registering markers in pyproject.toml ( #7622 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-08-05 12:03:27 -03:00
Yutaro Ikeda
84c4b64354
Better document -k partial matching ( #7610 )
2020-08-04 15:30:08 -03:00
Bruno Oliveira
d688fefecb
Merge pull request #7614 from The-Compiler/log-print
...
Properly remove log_print
2020-08-04 13:39:21 -03:00
Florian Bruhin
1c9b84756f
Properly remove log_print
...
This is a follow up to 3f8200676f
which didn't
make it clear that log_print is also removed in the changelog and didn't remove
it from the reference docs.
2020-08-04 08:53:09 +02:00
Ran Benita
b8471aa527
testing: fix some docstring issues
...
In preparation for enforcing some docstring lints.
2020-08-03 10:10:43 +03:00
C. Titus Brown
a2d562d369
Minor formatting fix in xunit_setup.rst
...
Fixed location of double-backquote for verbatim text.
2020-08-01 07:33:03 -07:00
Ran Benita
0242de4f56
Format docstrings in a consistent style
2020-08-01 17:14:37 +03:00
Bruno Oliveira
e49f1d6f60
Merge pull request #7584 from pytest-dev/release-6.0.1
...
Prepare release 6.0.1
(cherry picked from commit 022bff27a71406bd5dc4794d34f1fbbf56a45250)
2020-07-30 09:46:53 -03:00
Hugo van Kemenade
d756b4a543
Fix typo: remove stray indefinite article from release notes ( #7552 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-07-29 12:19:33 -03:00
Mattreex
1e66ed0b1c
Warn about --basetemp removing the entire directory ( #7555 )
...
Co-authored-by: mattreex <mattreex.9@gail.com>
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-07-29 11:58:18 -03:00
Drew Devereux
88cc636c18
Update markers.rst ( #7563 )
...
Extra colon to make code block render correctly
2020-07-29 09:10:13 +02:00
Bruno Oliveira
70764bef4f
Merge pull request #7550 from pytest-dev/release-6.0.0
2020-07-28 17:01:27 -03:00
Anthony Sottile
9818899df4
remove usage of pylib in docs
2020-07-26 17:57:25 -07:00
Bruno Oliveira
7ec6401ffa
Change pytest deprecation warnings into errors for 6.0 release ( #7362 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-07-22 21:36:51 -03:00
Bruno Oliveira
a9799f0b35
Merge pull request #7531 from bluetech/changelog-mypy-version
...
doc: mention mypy<0.750 doesn't work in typing changelog
2020-07-22 16:21:11 -03:00
Ran Benita
102360b490
Merge pull request #7519 from hroncok/pytest_warning_captured_deprecated
...
List pytest_warning_captured in deprecated things for 6.0.0rc1
2020-07-22 20:50:52 +03:00
Ran Benita
1a18dfd651
doc: mention mypy<0.750 doesn't work in typing changelog
2020-07-22 20:48:24 +03:00
Kelton Bassingthwaite
dbc50a7061
Clarify usage of usefixtures mark in hooks
...
Fix #7512
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-07-21 23:00:47 -03:00
Garrett Thomas
3ed05ee4d6
Fix typo
...
Change from "A xfail" to "An xfail"
2020-07-20 18:16:13 +02:00
Kostis Anagnostopoulos
07ed197247
doc: note about mutation of parametrized values ( #7516 )
...
Fix #7514 by augmenting Note with behaviour when parametrized values are mutated
(changes are reflected in subsequent test-case calls).
2020-07-20 15:12:48 +03:00
Miro Hrončok
fbeb36226f
List pytest_warning_captured in deprecated things for 6.0.0rc1
2020-07-20 13:41:28 +02:00
Debi Mishra
25b56e9c69
docs: Add a note about -q option used in getting started guide
2020-07-20 01:28:11 +05:30
Ran Benita
8783e65f8d
Merge pull request #7509 from bluetech/sphinx3
...
docs: support Sphinx>=3.1 and require it
2020-07-18 12:38:26 +03:00
Ran Benita
65b014a117
docs: support Sphinx>=3.1 and require it
...
Previously was restricted to >=1.8.2,<2.1, but newer versions have some
nice improvements I'd like to be able to use in upcoming changes.
Changelog: https://www.sphinx-doc.org/en/master/changes.html#release-3-1-0-released-jun-08-2020
There are two issues that came up:
1. `highlightlang` is deprecated for `highlight`.
2. Doesn't like having two `automethod` generated for the same
`Metafunc.parametrize` method. Gives this warning:
`pytest/doc/en/reference.rst:846: WARNING: duplicate object description of _pytest.python.Metafunc.parametrize, other instance in reference, use :noindex: for one of them`
To work around this I make `pytest.mark.parametrize` link to
`Metafunc.parametrize` instead of repeating it.
2020-07-17 23:17:11 +03:00
Bruno Oliveira
97f560d4d1
Clarify 'getfixture' needs to access fixtures by normal means
...
Related to #7497
2020-07-14 20:21:57 -03:00
Bruno Oliveira
789654dfe2
Small fixes/updates to the 6.0.0rc1 CHANGELOG
...
- Grammar fixes
- Moved a few sections from Features to Improvements
- Used internal doc links when appropriate
2020-07-11 15:41:10 -03:00
Bruno Oliveira
d466cc25a7
Merge pull request #7424 from nicoddemus/package-scope-experimental-7389
...
Remove package scope experimental status
2020-07-11 08:44:34 -03:00
Bruno Oliveira
906d8496c9
New doc role: globalvar for special variables
...
This introduces a new role, `:globalvar:`, so we can mark/reference
variables like `pytest_plugins`, `pytestmark`, etc. This besides being useful
also makes the documentation look more consistent.
2020-07-10 09:50:03 -03:00
Hugo van Kemenade
c1c5a2b34a
Add support for NO_COLOR and FORCE_COLOR ( #7466 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-07-10 08:49:10 -03:00
Bruno Oliveira
b22d466345
Remove duplicated users from release announcement
2020-07-08 17:51:57 -04:00
Bruno Oliveira
7d033a8950
Prepare release version 6.0.0rc1
2020-07-08 17:51:01 -04:00
Bruno Oliveira
64b19595a5
Set correct version during regen
2020-07-08 17:49:09 -04:00
Bruno Oliveira
d812690569
Adjust regendoc for getting-started
2020-07-08 17:49:09 -04:00
Bruno Oliveira
9db9f04432
Use builtin compile in doc example
...
Follow up to #7438
2020-07-08 17:49:09 -04:00
Bruno Oliveira
93d2ccbfb7
Point to stable docs instead of latest
...
Now that our master might contain new features, it is best to point
users to the stable docs rather than the latest
2020-07-07 07:45:27 -03:00
Bruno Oliveira
b6a31b9c4d
Remove warning about development/outdated docs
...
Unfortunately couldn't figure out how to fix the generated link, so at least
for now remove it to avoid confusion.
Fix #7331
2020-07-06 20:28:30 -03:00
Bruno Oliveira
289197ff22
Remove package scope experimental status
...
Close #7389
2020-06-27 11:16:50 -03:00
Florian Bruhin
103bfd20d4
Add webinar
2020-06-26 17:08:14 +02:00
Florian Bruhin
ba50ef33d3
Add open training at Workshoptage 2020
2020-06-25 17:32:34 +02:00
Daniel
6cbbd2d90b
Fix typo in examples/markers.rst
2020-06-23 22:38:11 +02:00
Ran Benita
b6fd89ef31
Merge pull request #7370 from bluetech/typing3
...
Some type annotations, doc improvements
2020-06-16 11:23:57 +03:00
Bruno Oliveira
d7c5b61f6d
Docs: Update tense, the final Python 2.7 was released in April ( #7367 )
...
Docs: Update tense, the final Python 2.7 was released in April
2020-06-15 16:16:39 -03:00
Ronny Pfannschmidt
4e5a7b7d2f
Merge pull request #7366 from gnikonorov/issue_7346
...
Allow users to provide version information to the required_plugins INI key
2020-06-15 20:19:05 +02:00
Ran Benita
33804fd9b7
doc/reference: move "Collection hooks" before "Test running hooks"
...
Collection occurs before test running, so it seems more logical.
2020-06-14 17:31:38 +03:00
Ran Benita
da1124eb98
hookspec: improve runtest hooks documentation
2020-06-14 17:31:38 +03:00
Ran Benita
2a38ca8a0c
doc/reference: add CollectReport
...
CollectReport appears in several hooks, so we should document it. It's
runtest equivalent TestReport is already documented.
2020-06-14 16:55:41 +03:00
Ran Benita
5e35c86a37
doc/reference: refer to function public names instead of internal _pytest names
...
This way e.g. a :py:func:`pytest.exit` cross-reference works properly.
2020-06-14 16:54:50 +03:00
Hugo van Kemenade
03d0a10e3a
The final Python 2.7 was released in April
...
The final Python 2.7.18 release was on 20 Apr 2020.
https://mail.python.org/archives/list/python-dev@python.org/thread/OFCIETIXLX34X7FVK5B5WPZH22HXV342/#OFCIETIXLX34X7FVK5B5WPZH22HXV342
2020-06-13 20:50:24 +03:00
Gleb Nikonorov
320625527a
Add more tests and docs
2020-06-13 11:22:18 -04:00
Bruno Oliveira
ab6dacf1d1
Introduce --import-mode=importlib ( #7246 )
...
Fix #5821
Co-authored-by: Ran Benita <ran@unusedvar.com>
2020-06-13 11:29:01 -03:00
Bruno Oliveira
aaa6f1c3fa
Merge pull request #7330 from gnikonorov/issue_7305
2020-06-12 19:35:38 -03:00
Zac-HD
564b2f707d
Finish deprecation of "slave"
2020-06-12 22:49:33 +10:00
Gleb Nikonorov
2c8e356174
rename _emit_warning_or_fail to _warn_or_fail_if_strict and fix a doc typo
2020-06-12 08:27:55 -04:00
Martin Michlmayr
68572179cb
doc: Fix typos and cosmetic issues
2020-06-11 16:22:47 +08:00
Florian Bruhin
e36d5c05c6
doc: Explain indirect parametrization and markers for fixtures
2020-06-10 14:27:45 +02:00
Gleb Nikonorov
95cb7fb676
review feedback
2020-06-10 00:44:22 -04:00
Anthony Sottile
aabf03350a
Merge pull request #7326 from xinbinhuang/improve_marker_doc
...
Remove start_doc_server.sh script
2020-06-09 01:55:30 -07:00
Xinbin Huang
c471b382f5
Remove start_doc_server.sh script
2020-06-08 21:01:11 -07:00
Bruno Oliveira
fcbaab8b0b
Allow tests to override "global" `log_level` (rebased) ( #7340 )
...
Co-authored-by: Ruaridh Williamson <ruaridh.williamson@flexciton.com>
2020-06-08 22:05:46 -03:00
Bruno Oliveira
c17d50829f
Add pyproject.toml support ( #7247 )
2020-06-08 10:03:10 -03:00
Gleb Nikonorov
13add4df43
documentation fixes
2020-06-07 15:37:50 -04:00
Gleb Nikonorov
42deba59e7
Update documentation as suggested
2020-06-06 22:34:15 -04:00
Bruno Oliveira
ceac6736d7
Fix mention using --rootdir mention inside pytest.ini (not supported) ( #6825 )
...
Co-authored-by: Ran Benita <ran@unusedvar.com>
2020-06-06 19:17:40 -03:00
Gleb Nikonorov
f760b105ef
Touchup pre-PR
2020-06-06 11:06:08 -04:00
Gleb Nikonorov
2a3c21645e
Commit solution thus far, needs to be polished up pre PR
2020-06-06 02:38:18 -04:00
Xinbin Huang
19ad588935
Add reference to builtin markers to doc ( #7321 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-06-05 08:10:16 -03:00
Bruno Oliveira
be1a2e440e
Merge pull request #7301 from pytest-dev/release-5.4.3
...
Prepare release 5.4.3
2020-06-02 14:19:18 -03:00
Ran Benita
85b5a289f0
warnings: fix missing None in existing hook & add some docs ( #7288 )
2020-06-02 19:59:25 +03:00
xuiqzy
5517f7264f
Remove doc line that is no longer relevant for Python3-only ( #7263 )
...
* Fix typo in capture.rst documentation
Rename ``capfsysbinary`` to ``capsysbinary`` as the former does not exist as far as i can see.
* Make Python uppercase in doc/en/capture.rst
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Remove the sentence entirely
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Ran Benita <ran@unusedvar.com>
2020-06-02 15:56:39 +03:00
Bruno Oliveira
2f406bb9cb
Replace custom flask theme by the official one ( #6453 )
...
Ref: #6402
2020-06-01 14:21:08 +02:00
Ronny Pfannschmidt
c16ede5ce6
Merge pull request #7255 from gnikonorov/issue_4049
...
Add new hook pytest_warning_recorded
2020-05-31 12:47:46 +02:00
Maximilian Cosmo Sitter
b32f4de891
Issue 7202 - Point development guide to contributing section ( #7280 )
2020-05-31 09:37:26 +03:00
Ronny Pfannschmidt
54ae27f081
Merge pull request #7252 from symonk/6900-class-per-instance-of-test-docs
...
document class instantiation for tests inside classes
2020-05-25 19:58:23 +02:00
Gleb Nikonorov
088d400b2d
rename pytest_warning_record -> pytest_warning_recorded
2020-05-24 20:43:23 -04:00
Gleb Nikonorov
9ee6550181
Add in a new hook pytest_warning_recorded for warning capture
...
communication
2020-05-24 19:05:24 -04:00
symonk
5061a47de8
add missing test text to docs
2020-05-24 16:33:17 +01:00
symonk
4f93bc01af
update terminology of class individuality as per PR feedback
2020-05-24 16:31:51 +01:00
symonk
568e00af15
fixing up formatting inline with a smaller shell and typos
2020-05-24 11:43:29 +01:00
symonk
bad7a0207f
document new class instance per test
2020-05-24 11:34:54 +01:00
Florian Dahlitz
62d3577435
Add note about --strict and --strict-markers to references
2020-05-22 16:33:50 +02:00
mcsitter
fa6a13a7cc
Updated compatible python versions
...
As indicated on pypi and in the README pytest supports python version 3.8 and 3.9. The documentation should match.
2020-05-20 22:41:52 +02:00
Katrin Leinweber
9bf28853bf
doc: highlight difference between progress percentage & code coverage ( #6686 )
2020-05-18 20:51:22 +03:00
Ran Benita
3f8200676f
logging: remove deprecated --no-print-logs option/ini
...
This option was deprecated in 5.4.0 and was marked for removal in 6.0.0.
2020-05-17 21:41:38 +03:00
Bruno Oliveira
f506682abe
Merge pull request #6919 from nicoddemus/backport-6914
2020-05-16 12:42:15 -03:00
Zac Hatfield-Dodds
6df0b9c41a
Merge pull request #7213 from hrichards/clarify_docs_on_nose_yield-based_tests
2020-05-13 12:38:45 +10:00
Hunter Richards
06b6d5b1d5
Combine all mentions of `yield` into "Unsupported" section
2020-05-11 15:36:08 -05:00
Paweł Wilczyński
dbfc629698
#7138 Docs improvement: Apply indirect on particular arguments
2020-05-11 13:26:16 +02:00
Bruno Oliveira
e6151cd8d0
Cherry-pick release 5.4.2
2020-05-08 09:03:21 -03:00
Ran Benita
81da5dac48
Merge pull request #7122 from bluetech/matcher-parser
...
Stop using Python's eval() for -m and -k
2020-05-07 09:23:29 +03:00
Bruno Oliveira
199f45d0a9
Merge pull request #7027 from blueyed/doc-rm-rm
2020-05-06 12:43:51 -03:00
Bruno Oliveira
095a195d71
Improve docs about junit_family warning message
...
From discussion in #6178
2020-05-02 13:01:15 -03:00
Bruno Oliveira
5c37898949
Fix some typos in the CHANGELOG
2020-05-01 14:39:09 -03:00
Ran Benita
a718ad6363
Stop using Python's eval() for -m and -k
...
Previously, the expressions given to the `-m` and `-k` options were
evaluated with `eval`. This causes a few issues:
- Python keywords cannot be used.
- Constants like numbers, None, True, False are not handled correctly.
- Various syntax like numeric operators and `X if Y else Z` is supported
unintentionally.
- `eval()` is somewhat dangerous for arbitrary input.
- Can fail in many ways so requires `except Exception`.
The format we want to support is quite simple, so change to a custom
parser. This fixes the issues above, and gives us full control of the
format, so can be documented comprehensively and even be extended in the
future if we wish.
2020-05-01 12:59:06 +03:00
ArtyomKaltovich
bef263ee76
update doctests.rst regarding issue #7116
...
https://github.com/pytest-dev/pytest/issues/7116
2020-04-28 23:04:58 +03:00
Ran Benita
907e29a47b
fixtures: deprecate pytest._fillfuncargs function
...
This function is exposed and kept alive for the oejskit plugin which is
abandoned and no longer works with recent plugins, so let's prepare to
completely remove it.
2020-04-24 18:54:46 +03:00
Ronny Pfannschmidt
244c8e4a13
Merge pull request #6680 from RonnyPfannschmidt/fix-6294-more-docs-for-fromparent
...
doc: more docs for from_parent
2020-04-10 13:10:40 +02:00
Daniel Hahler
1fd14685c5
doc: document inversed lines with terminal report hooks ( #7016 )
...
It was surprising that `tryfirst=True` would not result in lines being
added to the beginning with `pytest_report_header`.
This is due to lines being reversed, and therefore the same applies to
`pytest_report_collectionfinish`.
2020-04-07 08:08:28 +02:00
Daniel Hahler
3a4435fb59
doc: fix/remove leftovers from removing `versionadded` ( #7028 )
...
Ref: 9c5da9c
(https://github.com/pytest-dev/pytest/pull/5184 )
2020-04-07 08:01:50 +02:00
Daniel Hahler
51c1ae89cd
doc: remove deprecations from pytest 3
...
This is in line with 9c5da9c0d
, which versionadded instructions.
2020-04-06 07:02:15 +02:00
Alfredo Deza
7d75762de6
Do not use automatic title in fixture reference
...
It creates odd wording otherwise. Keep the reference, update the title
using Sphinx notation.
2020-04-01 09:55:30 -04:00
Nikolay Kondratyev
285beddf28
Fix documentation typo
2020-03-29 16:55:56 +03:00
Bruno Oliveira
f84742d46c
Merge pull request #6980 from nicoddemus/quick-doc-fix
...
Quick doc fix on xfail reason parameter
2020-03-28 16:11:18 -03:00
Bruno Oliveira
c6517e2c3a
Merge pull request #6977 from bluetech/oserror-aliases
...
Change EnvironmentError, IOError to OSError - they are aliases
2020-03-28 11:32:34 -03:00
Bruno Oliveira
70cbce7ccc
Quick doc fix on xfail reason parameter
...
As per https://github.com/pytest-dev/pytest/pull/6957/files#r399564043
2020-03-28 11:30:15 -03:00
Tim Hoffmann
0e4a44db3b
Better document xfail(condition) ( #6957 )
2020-03-27 22:46:42 +03:00
Ran Benita
a785754523
Change EnvironmentError, IOError to OSError - they are aliases
...
Since Python 3.3, these are aliases for OSError:
https://docs.python.org/3/whatsnew/3.3.html#pep-3151-reworking-the-os-and-io-exception-hierarchy
2020-03-27 18:40:23 +03:00
Daniel Hahler
aae0579bcd
doc: use `envvar` directive for environment variables ( #6874 )
...
This changes the link anchors in "reference.html", from e.g.
`reference.html#pytest-current-test` to
`reference.html#envvar-PYTEST_CURRENT_TEST`, but I think that is OK, and
not worth adding labels for the old anchors.
2020-03-27 02:40:25 +01:00
Daniel Hahler
327ec54248
Doc fixes ( #6861 )
2020-03-27 02:22:03 +01:00
Lewis Belcher
27341d17fa
Update fixture.rst
...
Fix up some mangled wording.
2020-03-23 09:02:06 +01:00
Danny Sepler
2d897ad39f
Fix reference to the cache fixture
2020-03-14 20:12:52 -04:00
Bruno Oliveira
68d4b17a5f
Cherry pick CHANGELOG from 5.4.1
2020-03-13 11:13:05 -03:00
Bruno Oliveira
010e711971
Merge pull request #6914 from nicoddemus/revert-6330
...
Revert "[parametrize] enforce explicit argnames declaration (#6330 )"
2020-03-13 10:49:48 -03:00
pytest bot
c9fd1bdbd6
Preparing release version 5.4.0
2020-03-12 14:14:35 +00:00
Ronny Pfannschmidt
93aa988e01
Merge pull request #6901 from RonnyPfannschmidt/regendoc-fix-simple
...
run and fix tox -e regen to prepare 5.4
2020-03-12 15:09:10 +01:00
Tobias Schmidt
90ee8a7599
docfix
2020-03-12 09:38:00 +01:00
Ronny Pfannschmidt
378a75ddf6
run and fix tox -e regen to prepare 5.4
...
* no longer trigger deprecation warnings when looking up fixtures
* fix missed imports in a test example
2020-03-11 22:25:51 +01:00
Ronny Pfannschmidt
09b289e286
fix mozilla qa project link
2020-03-11 11:10:33 +01:00
Ronny Pfannschmidt
694dbe5bd4
fix pydanny.com url to the one with ssl set up
2020-03-11 10:52:16 +01:00
Daniel Hahler
e3cf4fc258
doc/en/Makefile: use Sphinx's make mode ( #6873 )
...
Syncs it from the output of current sphinx-quickstart.
2020-03-07 23:45:05 +01:00
Daniel Hahler
9e8540f25f
docs: remove doc/en/links.inc ( #6853 )
2020-03-06 03:11:24 +01:00
Daniel Hahler
3865f77de3
doc: TestReport: :show-inheritance:
2020-03-05 06:00:11 +01:00
Daniel Hahler
a1ad6e3117
doc: fix/revisit _Result (hook wrappers)
...
- it should not document the deprecated `result`; used the same as
pluggy documents itself
- add a "hookwrapper" label, that could be used by pluggy (currently it
links to the section)
- use pluggy's `hookwrappers` label for linking to its documentation
2020-03-05 05:55:04 +01:00
Daniel Hahler
9b32794391
intersphinx_mapping: add pluggy
2020-03-05 05:53:42 +01:00
Daniel Hahler
77adb33ec6
doc: use show-inheritance with warnings, revisit docstrings
...
Revisits the docstring for `PytestExperimentalApiWarning` and
`PytestUnhandledCoroutineWarning`.
2020-03-05 02:56:18 +01:00
Bruno Oliveira
d161bedcee
Add an example of how to port the code
2020-03-04 09:23:31 -03:00
Daniel Hahler
bd7e33277b
docs: remove tracking through Google Analytics ( #6843 )
...
This might not even be monitored by anyone, but if it is useful in
general should probably get replaced with a less controversial provider.
2020-03-03 01:35:14 +01:00
Daniel Hahler
620d457756
doc: add __tracebackhide__ label
2020-03-02 17:08:37 +01:00
Ronny Pfannschmidt
3637d9eb3f
followup: add note on from_parent kwargs
2020-03-01 20:34:38 +01:00
Ronny Pfannschmidt
5c1e56d350
docs: from_parent - add minimal before/after example
...
fixup: fix from_parent version
2020-03-01 20:34:38 +01:00
Bruno Oliveira
ff7b5dbbde
Merge pull request #6784 from nicoddemus/deprecate-terminal-writer
...
Deprecate TerminalReporter.writer
2020-02-28 21:07:02 -03:00
Daniel Hahler
f77d606d4e
docs: generate index and add it to globaltoc sidebar ( #6808 )
2020-02-27 00:34:18 +01:00
Daniel Hahler
2e48c32dea
docs: fix reference to config.cache fixture ( #6807 )
2020-02-26 01:24:18 +01:00
Stefano Mazzucco
2451716746
Remove reference to old konira plugin from docs ( #6819 )
...
The pytest-konira plugin has not seen an update since 2011, moreover
the "project description" on PyPI points to a dubious website that
does not actually correspond to the project and instead redirects to
advertising content.
2020-02-26 01:19:40 +01:00
kpinc
eeebcd77dd
doc: add list of fixtures to start of fixture chapter ( #6696 )
...
- Add list of fixtures to start of fixture chapter
- Add "fixture" cross ref type
2020-02-22 14:56:19 +01:00
TWood67
b26e60c2da
updated documentation
...
added a default value so a runtime exception does not occur
2020-02-21 11:45:24 -06:00
Bruno Oliveira
435ad221f9
Deprecate TerminalReporter.writer
...
Fix #6779
2020-02-20 21:04:49 -03:00
Nathaniel Compton
7c09d88b72
#6289 : Add new example to XFAIL documentation ( #6685 )
...
Fix #6289
Co-authored-by: Ran Benita <ran234@gmail.com>
2020-02-19 15:04:37 -03:00
Daniel Hahler
d18c75baa3
doc: fix test with link to `python_files` ( #6741 )
...
Follow-up to b09762d
(#6705 ).
Ref: https://github.com/pytest-dev/pytest/pull/6705#discussion_r379819573
2020-02-16 10:30:25 +01:00
kpinc
9785ee438d
doc: expand first sentence on fixtures into a paragraph ( #6742 )
2020-02-15 18:35:36 +01:00
Daniel Hahler
b09762df27
doc: link to `python_files` from "Assertion Rewriting" ( #6705 )
...
Ref: https://github.com/pytest-dev/pytest/issues/6377
Ref: https://github.com/blueyed/pytest/pull/145
2020-02-15 00:32:16 +01:00
Bruno Oliveira
e6ea9edffe
Merge pull request #6673 from sscherfke/features
...
Reverse / fix meaning of "+/-" in error diffs
2020-02-12 15:05:38 -03:00
Ran Benita
c9f9664336
Merge branch 'features' into master
...
The features branch is no more. Development of features is now also done
on master.
See https://github.com/pytest-dev/pytest/pull/6571 .
2020-02-12 13:50:02 +02:00
Ran Benita
c3e53a072d
Switch to new git workflow
...
Co-Authored-By: Daniel Hahler <git@thequod.de>
2020-02-12 09:49:21 +02:00
Bruno Oliveira
78baa7b575
Merge remote-tracking branch 'upstream/master' into mm
...
Conflicts:
src/_pytest/main.py
src/_pytest/mark/structures.py
src/_pytest/python.py
testing/test_main.py
testing/test_parseopt.py
2020-02-11 19:22:28 -03:00
Ran Benita
d33da078a8
Move ExitCode's definition from _pytest.main to _pytest.config
...
ExitCode is used in several internal modules and hooks and so with type
annotations added, needs to be imported a lot.
_pytest.main, being the entry point, generally sits at the top of the
import tree.
So, it's not great to have ExitCode defined in _pytest.main, because it
will cause a lot of import cycles once type annotations are added (in
fact there is already one, which this change removes).
Move it to _pytest.config instead.
_pytest.main still imports ExitCode, so importing from there still
works, although external users should really be importing from `pytest`.
2020-02-10 23:55:06 +02:00
Stefan Scherfke
d59adc61f9
Reverse / fix meaning of "+/-" in error diffs
...
The convention is "assert result is expected". Pytest's error diffs now
reflect this. "-" means that sth. expected is missing in the result and
"+" means that there are unexpected extras in the result.
Fixes : #3333
2020-02-10 21:12:37 +01:00
Vladyslav Rachek
9e262038c8
[parametrize] enforce explicit argnames declaration ( #6330 )
...
Every argname used in `parametrize` either must
be declared explicitly in the python test function, or via
`indirect` list
Fix #5712
2020-02-06 20:20:25 -03:00
rebecca-palmer
c55bf23cbe
doc: s/pytest_mark/pytestmark ( #6661 )
2020-02-03 08:56:37 +01:00
Hugo van Kemenade
c9eeafade5
Fix favicon for Chrome and Opera ( #6639 )
...
* Fix favicon for Chrome and Opera
* Delete pytest1favi.ico
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-01-31 20:56:45 -03:00
Ran Benita
a435faad5c
Merge branch 'master' into master-to-features
2020-01-31 11:27:06 +02:00
Hugo van Kemenade
55bffb7c15
Fix typo
2020-01-30 18:30:51 +02:00
Daniel Arndt
d91459fc75
Reword fixture docs for clarity
2020-01-30 09:32:54 -04:00
Daniel Hahler
b5b6e051ed
Merge master into features
2020-01-30 02:29:02 +01:00
Daniel Hahler
d478e2bbca
doc: release-5.3.4
...
(cherry picked from commit fd1a51a23fa687cf344f3506dff6cde0166faf2c)
2020-01-29 18:28:11 +01:00
Bruno Oliveira
8c41236c66
doc: getting-started.rst: mention "Test" prefix for classes ( #6583 )
...
doc: getting-started.rst: mention "Test" prefix for classes
2020-01-29 12:49:49 -03:00
sdementen
d848a20563
Extend the incremental marker for parametrize
...
The incremental marker is adapted to handle properly test classes with parametrize defined at class level.
Fix #3125
2020-01-29 08:25:17 -03:00
Daniel Hahler
ddaa5d88ac
terminal: default to `fE` with `-r` (reportchars)
...
Adds handling of `N` to reset `reportchars`, which can be used to get
the old behavior (`-rN`), and also allows for an alternative to
`--disable-warnings` (https://github.com/pytest-dev/pytest/issues/5066 ),
since `w` was included by default (without `--disable-warnings`).
Fixes https://github.com/pytest-dev/pytest/issues/6454
2020-01-29 00:33:15 +01:00
ParetoLife
cbad319736
Update getting-started.rst
...
From the description it seemed to me as if just prefixing your methods with ``test_`` was enough, but you also need to prefix your class with ``Test``. Of course, in the reference material this is clearly stated, but I think it makes sense to mention it here as well, since you also mention the part about the methods' prefix.
2020-01-27 10:50:05 +01:00
Daniel Hahler
09bdbffbde
Merge master into features
...
Conflicts:
src/_pytest/_code/code.py
src/_pytest/main.py
2020-01-24 23:44:50 +01:00
Daniel Hahler
040a61e22c
Merge pull request #6550 from blueyed/doc-cleandir-cd-back
...
doc/en/fixture.rst: chdir back to previous directory
2020-01-24 23:41:08 +01:00
Daniel Hahler
cdd6f86e43
bug-fix fixes
2020-01-23 20:34:21 +01:00
Daniel Hahler
83451b548f
doc/en/fixture.rst: chdir back to previous directory
...
This is considered to be best practice, and should be used in docs
therefore.
2020-01-23 19:09:18 +01:00
Daniel Hahler
b63cb18776
doc: remove costlysetup example
...
It is not included with docs, and
`example/costlysetup/sub_a/test_quick.py::test_quick` sleeps for 5s,
slowing down `doctesting` unnecessarily.
2020-01-23 12:23:30 +01:00
Bruno Oliveira
93b74d28d2
Merge remote-tracking branch 'upstream/master' into mm
...
Conflicts:
* src/_pytest/_code/code.py
* src/_pytest/main.py
* testing/python/metafunc.py
* testing/test_parseopt.py
* testing/test_pytester.py
2020-01-22 11:03:45 -03:00
Bruno Oliveira
6a26ac4125
Preparing release version 5.3.4
2020-01-20 13:53:31 -03:00
Bruno Oliveira
544b4a14d5
Fix Hugo van Kemenade name in release announcement
...
Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-01-17 07:18:57 -03:00
Bruno Oliveira
56dc301c50
Preparing release version 5.3.3
2020-01-16 18:55:41 -05:00
Bruno Oliveira
aa05334984
Remove broken link for user @jgsonesen
2020-01-16 18:51:33 -05:00
Daniel Hahler
5b0e255e85
Merge pull request #6465 from blueyed/doc-rootdir
...
doc: revisit section about rootdir
2020-01-16 21:55:12 +01:00
Daniel Hahler
83813bf515
Merge master into features
...
Conflicts:
.github/workflows/main.yml
2020-01-16 19:45:52 +01:00
Daniel Hahler
4630e2725e
Use `TYPE_CHECKING` instead of `False`
...
This allows for e.g. Jedi to infer types (it checks the name).
It was only used to support Python 3.5.0/3.5.1, where this is is not
available in the `typing` module.
Ref: https://github.com/davidhalter/jedi/issues/1472
Uses `TYPE_CHECKING = False` in `_pytest.outcomes` to avoid having to
work around circular import.
2020-01-16 16:11:39 +01:00
Bruno Oliveira
9298f7e4a9
Improve CHANGELOG and docs for junit_logging
2020-01-16 07:47:00 -03:00
Jakub Mitoraj
ab6406b42e
Update junit_logging with no,log,system-out,system-err,out-err,all
2020-01-16 08:14:46 +01:00
Daniel Hahler
bebfd28da3
doc: revisit section about rootdir
...
Ref: https://github.com/pytest-dev/pytest/issues/6376
2020-01-15 09:43:35 +01:00
Daniel Hahler
1356d20e90
Merge master into features
2020-01-10 05:20:41 +01:00
Bruno Oliveira
23475b6ab9
Fix wrong 'changelog' and 'reference' links in docs
...
Both references were referencing links from Python because of our intersphinx
mapping in `conf.py`:
intersphinx_mapping = {"python": ("https://docs.python.org/3 ", None)}
Because Python's docs explicitly define both references, Sphinx fallbacks to
them instead of generating implicit references as was expected.
Fix #6397
2020-01-09 18:06:15 -03:00
Anthony Sottile
26a2e1aba7
Merge pull request #6401 from nicoddemus/4.6-maintenance-docs-onward
...
Update py27/py34 deprecation docs
2020-01-04 16:24:56 -05:00
Anthony Sottile
75f964c08d
Merge pull request #6391 from asottile/release-4.6.9
...
Preparing release version 4.6.9
2020-01-04 13:01:46 -08:00
Bruno Oliveira
4fa819e535
Update py27/py34 deprecation docs
...
I've updated the text and incorporated the topics from #5275 , so this
can now be part of the official docs, and #5275 can be closed/unpinned.
Closes #5275
2020-01-04 17:52:02 -03:00
Bruno Oliveira
deb4287d1c
Update copyright year to 2020
...
Merge pull request #6392 from hugovk/4.6-maintenance-2020
2020-01-04 08:46:58 -03:00
Adam Johnson
73702ca88b
Improve warnings docs
...
* Rearrange section about context manager to be in order
* Link to `pytest.warns` and `recwarn` since a reader going top to bottom won't have seen about those yet.
* Used only context manager form in the example; the call form is somewhat obsolete
and is mentioned in the reference docs already.
* Reuse the 'myfunction' from first example on the second one
Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>
2019-12-26 19:16:19 -03:00
Bruno Oliveira
a9608d54e0
Switch the order of the commands back and update the text
...
As suggested during review
2019-12-26 08:19:11 -03:00
Anthony Sottile
6cd61390c2
Improve docs so regen doesn't leak temp directories
2019-12-20 13:18:49 -08:00
Anthony Sottile
ab44d3d733
Merge pull request #6360 from asottile/release-4.6.8
...
Preparing release version 4.6.8
2019-12-19 16:01:04 -08:00
captainCapitalism
ed57b8e08a
invocation in last section 'pythonpath.rst' title swapped
...
The order of invocations 'python -m pytest' and 'pytest' are different in the header and the explanation. Me being lazy reading about the behaviour of 'former' looked up quickly the title and rushed to implementation to discover it actually works the other way - as stated in the documentation. So I propose to switch the order in the title to achieve consistent ordering and not confusing somebody like me again! :)
2019-12-19 11:35:52 +01:00
marc
536177bb56
fix typos in docs
2019-12-19 10:35:15 +01:00
Bruno Oliveira
75493f78bf
Merge master into features ( #6346 )
...
Merge master into features
2019-12-16 21:57:26 -03:00
Bruno Oliveira
c487cf9dd5
Deprecate no print logs ( #6333 )
...
Deprecate no print logs
2019-12-16 19:01:16 -03:00
Vinay Calastry
afbaee7649
Deprecate --no-print-logs option
2019-12-14 16:46:30 -08:00
Bruno Oliveira
853889e5db
Merge remote-tracking branch 'upstream/master' into mm
2019-12-14 10:45:44 -03:00
Bruno Oliveira
7f24cc2feb
Remove duplicated user from announcement
2019-12-14 10:06:59 -03:00
Bruno Oliveira
10fcac7f90
Preparing release version 5.3.2
2019-12-13 08:51:15 -03:00
Bruno Oliveira
cbb2f9541b
Merge pull request #6316 from cb109/make-keyword-expression-matching-case-insensitive
...
Make keyword expression matching case-insensitive
2019-12-12 06:47:59 -03:00
cmachalo
e13ad22364
Include new --capture-mode=tee-sys option
...
Fix #4597
2019-12-09 13:05:23 -03:00
Michael Rose
2ddc330b62
Fixes #6326 : Typo in the Security section docs home page.
2019-12-08 22:26:53 -05:00
Ronny Pfannschmidt
3812985ed4
update backward compatibility policy to allow for breakage
...
Co-Authored-By: Anthony Sottile <asottile@umich.edu>
Co-Authored-By: Bruno Oliveira <nicoddemus@gmail.com>
Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>
2019-12-07 18:59:21 +01:00
Bruno Oliveira
64c71daa21
Add 4.6.7 changelog to master
2019-12-05 17:32:45 -03:00
Christoph Bülter
623b3982b0
Update doc/en/example/markers.rst
...
Co-Authored-By: Bruno Oliveira <nicoddemus@gmail.com>
2019-12-05 16:59:08 +01:00
Christoph Buelter
ac5929eef3
Update docs about case-insensitive expression matching
2019-12-05 14:13:22 +01:00
Bruno Oliveira
985ac09048
Merge master into features ( #6312 )
...
Merge master into features
2019-12-03 13:36:58 -03:00
Bruno Oliveira
59f95b7f59
Merge remote-tracking branch 'upstream/master' into mm
2019-12-03 11:07:34 -03:00
Bruno Oliveira
41b7b109e9
Merge branch 'features' into unittest-debug
2019-12-03 10:52:53 -03:00
Ran Benita
42fb1f7ede
Merge pull request #6309 from jaredvasquez/fix-cafd-docs
...
Fix typo in documentation of capfd fixture
2019-12-03 12:15:40 +02:00
Jared Vasquez
c00a43a17d
fix typo
2019-12-02 22:29:22 -08:00
Ran Benita
d2d7b97a70
Remove outdated py2py3 example
2019-12-02 21:16:15 +02:00
Daniel Hahler
d3ab56f531
docs: move changelog to docs/en and allow sphinx directives
...
Now `tox -e docs` will also include the draft changelog for the
next version (locally only).
`CHANGELOG.rst` now only points to the changelog on READTHEDOCS so
sphinx diretives can be used.
Followup to https://github.com/pytest-dev/pytest/pull/6272
2019-11-28 21:23:58 -03:00
Bruno Oliveira
05008f6b55
Preparing release version 5.3.1
2019-11-25 14:32:37 -03:00
Daniel Hahler
b9dd0e6210
docs: add missing `log_cli` confval
2019-11-24 22:34:15 +01:00
Ronny Pfannschmidt
15ffe63204
update doc examples **untested**
2019-11-23 21:54:11 +01:00
Daniel Hahler
8b7aeefd7d
Merge pull request #6248 from blueyed/default-role
...
docs: configure default_role=literal
2019-11-21 18:44:17 +01:00
Zac Hatfield-Dodds
7e10c8191d
Added link checking to tox and release.py ( #5614 )
...
Added link checking to tox and release.py
2019-11-21 16:46:13 +11:00
Daniel Hahler
be722652f0
docs: configure default_role=literal
...
This configures the default role for interpreted text (single
backticks), avoiding the need to check for / enforce double backticks.
Fixes also one instance in the existing changelog:
- Detect `pytest_` prefixed hooks using the internal plugin manager since
``pluggy`` is deprecating the ``implprefix`` argument to ``PluginManager``.
(`#3487 <https://github.com/pytest-dev/pytest/issues/3487 >`_)
2019-11-21 00:35:00 +01:00
Bruno Oliveira
fe69a2cfb7
Delete 5934.feature.rst included in the wrong folder by accident
2019-11-20 07:06:11 -03:00
Bruno Oliveira
4b16b93cf5
Preparing release version 5.3.0
2019-11-19 12:43:51 -03:00
Bruno Oliveira
89eeefbbaf
Merge pull request #6192 from nicoddemus/remove-reportlog-6180
...
Remove report_log in favor of pytest-reportlog
2019-11-18 17:58:37 -03:00
Anthony Sottile
cc78444c30
Merge remote-tracking branch 'origin/master' into mm
2019-11-15 15:26:57 -08:00
Anthony Sottile
c9a96cdee8
Preparing release version 5.2.4
2019-11-15 13:26:56 -08:00
Bruno Oliveira
d2ea9e2db5
Remove report_log in favor of pytest-reportlog
...
Fix #6180
2019-11-14 19:47:26 -03:00
Bruno Oliveira
e856638ba0
Preparing release version 5.2.3 ( #6190 )
...
Preparing release version 5.2.3
2019-11-14 18:17:28 -03:00
Michael Shields
bd68c2a3dc
Update advice about _called_from_test.
...
Instead of giving an example of using sys and then, at the end,
advising not to use sys, just give a correct example. This is
especially helpful since mypy 0.740 has started (correctly) complaining
about sys._called_from_pytest not being present.
2019-11-14 19:44:27 +00:00
Bruno Oliveira
5e8c47faad
Preparing release version 5.2.3
2019-11-14 11:12:06 -03:00
Bruno Oliveira
2a67637acc
Issue a warning to prepare change of 'junit_family' default value
...
Fix #6179
2019-11-13 19:55:13 -03:00
Daniel Hahler
b06f33f474
terminal: report ``session.shouldfail`` reason (``-x``)
...
Via https://github.com/blueyed/pytest/pull/108 .
2019-11-13 16:18:41 +01:00
Brett Cannon
0b40749c98
Delineate syntactically that the 'match' argument to 'raises' is keyword-only
2019-11-12 12:32:05 -08:00
Daniel Hahler
04f27d4eb4
unittest: do not use TestCase.debug() with `--pdb`
...
Fixes https://github.com/pytest-dev/pytest/issues/5991
Fixes https://github.com/pytest-dev/pytest/issues/3823
Ref: https://github.com/pytest-dev/pytest-django/issues/772
Ref: https://github.com/pytest-dev/pytest/pull/1890
Ref: https://github.com/pytest-dev/pytest-django/pull/782
- inject wrapped testMethod
- adjust test_trial_error
- add test for `--trace` with unittests
2019-11-10 00:21:51 +01:00
Steffen Schroeder
ceeb7bd085
Fixed broken links
2019-11-06 20:54:41 +01:00
Steffen Schroeder
1cecdf6619
Added checklinks to tox and release.py
2019-11-06 20:54:41 +01:00
Bruno Oliveira
74f4ec5986
Making it possible to access the pluginmanager in the pytest_ad… ( #6106 )
...
Making it possible to access the pluginmanager in the pytest_addoptio…
2019-11-06 15:18:59 -03:00
Daniel Hahler
e7320c6b54
Merge pull request #5926 from AtakamaLLC/optional-multiline
...
Add log-auto-indent option to control multiline formatting
2019-11-06 00:35:24 +01:00
Joshua Storck
f400804206
Removing pluginmanager as parameter in definition of pytest_addoption hook
2019-10-30 16:25:50 -04:00
Joshua Storck
7a96d94fd4
Making it possible to access the pluginmanager in the pytest_addoption hook
2019-10-30 14:18:13 -04:00
Bruno Oliveira
b99661b9d7
Introduce --report-log option
...
Fix #4488
2019-10-30 09:43:33 -03:00
Michael Krebs
1f5b454355
Add log-auto-indent option to control multiline formatting
2019-10-25 11:31:33 -04:00
Bruno Oliveira
fb0e8b99d1
Merge remote-tracking branch 'upstream/master' into mm
...
Conflicts:
- src/_pytest/cacheprovider.py
2019-10-24 21:13:43 -03:00
Bruno Oliveira
b27ba97721
Preparing release version 5.2.2
2019-10-24 19:24:04 -04:00
Bruno Oliveira
2bee7d7c3e
Update Tidelift docs with latest campaign
...
Tidelift has launched a new marketing campaign as outlined here:
* https://forum.tidelift.com/t/task-enhancement-marketing-the-tidelift-subscription-to-your-users/321
This PR splits the previous "sponsor" information into two, Open Collective
and Tidelift (as they have very different target audiences).
Also took the opportunity to reorder some items at the end of
the contents page in a manner that I believe make more sense.
2019-10-24 14:58:58 -03:00
Daniel Hahler
803cc1f294
Merge master into features
2019-10-21 00:08:03 +02:00
Albert Tugushev
18786992bb
Update doc to use contextlib2.nullcontext
...
nullcontext has been backported in contextlib2==0.6.0
2019-10-19 15:09:37 +07:00
Daniel Hahler
0976e2f50d
Merge master into features
2019-10-18 17:51:42 +02:00
Andrzej Klajnert
f2dd9cc63e
Remove redundant mention from 5.2.0 release notes.
2019-10-17 13:17:34 +02:00
Bruno Oliveira
0383d43645
Add missing version added/changed markers to docs
...
Notice some features since 5.0 were not being properly
marked in which version they have been added/changed.
2019-10-15 19:45:58 -03:00
Nattaphoom Chaipreecha
83ba5eb58a
Add pudb to project examples
2019-10-12 08:10:04 +07:00