Commit Graph

14510 Commits

Author SHA1 Message Date
Bruno Oliveira 130c954bb1
Merge pull request #9904 from johnkangw/notes_update 2022-05-31 16:35:29 -03:00
Hugo van Kemenade e54c6a1362
Document the --code-highlight default (#9883)
Also normalized all help text using the patterns:

* `One sentence help text`
* `First sentence of help. Second sentence of help.`
2022-05-31 16:32:51 -03:00
Bruno Oliveira 9a8f5dd73e
Merge pull request #10007 from nicoddemus/importlib-docs 2022-05-31 16:24:55 -03:00
Bruno Oliveira 6017666fe1 Do not advertise that importlib will be default import mode
It is clear at this point that changing the default would break a lot of suites, and is not a clear win in all cases anyway.

Close #10003
2022-05-31 09:53:23 -03:00
Anthony Sottile a72e8b3d3e
Merge pull request #10006 from pytest-dev/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-05-30 18:31:30 -04:00
pre-commit-ci[bot] 0efd7a6ec6
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/mirrors-mypy: v0.950 → v0.960](https://github.com/pre-commit/mirrors-mypy/compare/v0.950...v0.960)
2022-05-30 21:00:26 +00:00
Ronny Pfannschmidt c533015c56
Merge pull request #9880 from jparise/getfixturemarker-attr
Use safe_getattr() in getfixturemarker()
2022-05-30 05:54:40 +02:00
github-actions[bot] e547cd565d
[automated] Update plugin list (#10001)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2022-05-29 13:04:53 -03:00
Zac Hatfield-Dodds a47e91e077
Merge pull request #9893 from jparise/pytester-mkdir-path 2022-05-27 20:51:50 -07:00
Zac Hatfield-Dodds 420dc7824b
Merge pull request #9990 from petebman/improve_getfixturevalue_error_message 2022-05-27 20:40:55 -07:00
Cheuk Ting Ho c988e49af6
Warn when test functions return other than None (#9956)
Closes #7337
2022-05-25 09:48:02 -03:00
github-actions[bot] 31f9e5bcdd
[automated] Update plugin list (#9985)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2022-05-24 11:12:31 +02:00
Tim Hoffmann 9a9acf13f8
Declutter doc entry page (#9969)
- Remove the index page https://docs.pytest.org/en/7.1.x/genindex.html
  Such an index is reasonable in books but not so much in HTML pages.
  IMHO the integrated search is much more user-friendly and sufficient.

- Remove the PDF link from the entry page. The PDF is already linked
  in the sidebar. I anticipate that getting the PDF documentation is
  not a major concern for users.

- Remove the sections "Changelog" and "License" from the entry page.
  These section only contain links to the respective pages.
  These topics are purely technical. They should be easily accessible
  (which they still are through sidebar section "About the project"),
  but they don't need additional advertisement through a dedicated
  section on the entry page.
2022-05-24 10:23:39 +02:00
Jon Parise 8ac6dce2c7
Add shell-style wildcard support to 'testpaths' (#9897)
This is especially useful for large repositories (e.g. monorepos) that
use a hierarchical file system organization for nested test paths.

    src/*/tests

The implementation uses the standard `glob` module to perform wildcard
expansion in Config.parse().

The related logic that determines whether or not to include 'testpaths'
in the terminal header was previously relying on a weak heuristic: if
Config.args matched 'testpaths', then its value was printed. That
generally worked, but it could also print when the user explicitly used
the same arguments on the command-line as listed in 'testpaths'. Not a
big deal, but it shows that the check was logically incorrect.

Now that 'testpaths' can contain wildcards, it's no longer possible to
perform this simple comparison, so this change also introduces a public
Config.ArgSource enum and Config.args_source attribute that explicitly
names the "source" of the arguments: the command line, the invocation
directory, or the 'testdata' configuration value.
2022-05-24 10:20:51 +02:00
Pete Baughman 0e62861e84 Improve error message in getfixturevalue 2022-05-23 17:54:22 +00:00
Bruno Oliveira 611b579d21
Merge pull request #9963 from pytest-dev/dependabot/pip/testing/plugins_integration/anyio-curiotrio--3.6.1 2022-05-17 09:12:45 -03:00
Bruno Oliveira 8469f44401
Merge pull request #9970 from ezio-melotti/fix-tempdirfactory-docstring
Fix rst markup in TempdirFactory's docstring.
2022-05-17 08:13:11 -03:00
Bruno Oliveira a1ed6839e3 Refer to py.path.local instead of LEGACY_PATH constant for better docs 2022-05-17 08:09:21 -03:00
Bruno Oliveira 08c0eb661e
Merge pull request #9968 from timhoffm/doc-reference-order 2022-05-17 07:55:06 -03:00
Bruno Oliveira 1feb857fcc
Merge pull request #9967 from timhoffm/doc-fix-globaltoc 2022-05-17 07:53:53 -03:00
Ezio Melotti 296b642eb3
Fix rst markup in TempdirFactory's docstring. 2022-05-17 07:29:32 +02:00
Tim Hoffmann ee10ecdf7e Reorder the reference guides in the docs
This changes the order to:

- API Reference
- Fixtures reference
- Configuration
- Exit codes
- Plugin List

which is approximately sorted from general to specific and often used to less used.
Plugin List ist at the end because it points to further external resources.
2022-05-16 23:01:54 +02:00
Tim Hoffmann 73c2d1c6e3 Remove "Python 2.7 and 3.4 Support" from globaltoc
Follow up to #9957 - I missed that the globaltoc is hard-coded
and the page needs to be removed there as well.
2022-05-16 22:52:27 +02:00
github-actions[bot] 7b977f4beb
[automated] Update plugin list (#9959)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2022-05-16 08:46:51 -03:00
Tim Hoffmann 5d28a58640
Remove docs on Python 2.7 and 3.4 Support (#9957)
This extensive explanation is not need anymore because they are now
unsupported for a long time.

Instead add as short section on Python version compatibility in the
backward compatibility docs.
2022-05-16 10:17:18 +02:00
dependabot[bot] 5d20e28538
build(deps): Bump anyio[curio,trio] in /testing/plugins_integration
Bumps [anyio[curio,trio]](https://github.com/agronholm/anyio) from 3.5.0 to 3.6.1.
- [Release notes](https://github.com/agronholm/anyio/releases)
- [Changelog](https://github.com/agronholm/anyio/blob/master/docs/versionhistory.rst)
- [Commits](https://github.com/agronholm/anyio/compare/3.5.0...3.6.1)

---
updated-dependencies:
- dependency-name: anyio[curio,trio]
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-16 03:02:09 +00:00
Bruno Oliveira cc0fbbefa0
Add CHANGELOG for #9873 (#9953) 2022-05-14 12:50:40 +02:00
sommersoft 56c266640e
Do not truncate crash messages in short test summary on CI (#9933)
Closes #9920
2022-05-13 08:15:52 -03:00
Bruno Oliveira 69fb79e741
Add colors to summary (#9875)
Fix #9873
2022-05-12 09:55:40 -03:00
Bruno Oliveira 90d2adf0e8
Merge pull request #9951 from rcomer/document-subtest 2022-05-12 09:35:39 -03:00
Ruth Comer c5432a18e7 doc: link to pytest-subtests 2022-05-12 12:20:00 +01:00
pre-commit-ci[bot] 16781f9b8c
[pre-commit.ci] pre-commit autoupdate (#9936)
[pre-commit.ci] pre-commit autoupdate
2022-05-11 10:52:41 -03:00
Pax a88c0f3bb0
Add link to python docs on logging levels (#9925) 2022-05-11 11:02:36 +03:00
Zac Hatfield-Dodds ccdee08ddd
Merge pull request #9911 from bkeyvani/fix-issue-8646 2022-05-10 23:53:40 -07:00
Zac Hatfield-Dodds a29f4aff98 Update 8646.improvement.rst 2022-05-10 23:27:33 -07:00
Zac Hatfield-Dodds 58af76122f Move changelog file 2022-05-10 23:27:06 -07:00
Zac Hatfield-Dodds 29462b1277 type-ignore in error-message test 2022-05-10 23:24:13 -07:00
Bruno Oliveira 37316ed0de
Merge pull request #9940 from timhoffm/doc-reference-cleanup 2022-05-10 17:21:32 -03:00
Tim Hoffmann 231e220635 Move documentation contents from reference.rst to docstrings
It's better to have the documentation in one place, instead
of having some in the docstring and some additional
information added to the reference documentation in
`reference.rst`.
2022-05-10 20:04:25 +02:00
Bruno Oliveira 93fdb3ecb7
Consistently add **Tutorial**: in front of how-to links in reference (#9938)
Up to now, some had the prefix, some didn't. I think it's good to have
this prefix to give more context, otherwise the links sometimes blend
into the description.

In one case, the link goes to an example, so I used `**Example**:` there.
2022-05-10 11:37:33 -03:00
Tim Hoffmann a4a8763ebf Consistently add **Tutorial**: in front of how-to links in reference
Up to now, some had the prefix, some didn't. I think it's good to have
this prefix to give more context, otherwise the links sometimes blend
into the description.

In one case, the link goes to an example, so I used `**Example**:` there.
2022-05-10 16:27:21 +02:00
Babak Keyvani 31a9c5c667 improve `pytest.raises` - cont'd
a few more iterations on error message and related tests.
2022-05-09 21:15:02 -04:00
Ran Benita db139307ce
Merge pull request #9931 from bluetech/py11-rglob
testing: fix Path.rglob("") failures in Python 3.11b1
2022-05-09 16:15:36 +03:00
Ran Benita 644a81af37 testing: fix Path.rglob("") failures in Python 3.11b1
Fix #9930.
2022-05-09 12:52:57 +03:00
Ran Benita f6aa9d661d
Merge pull request #9926 from pytest-dev/update-plugin-list/patch-5f9d68c8d
[automated] Update plugin list
2022-05-09 11:33:32 +03:00
Ran Benita 933156b296
Merge pull request #9915 from peymanslh/fix-encoding-warning
Fix default encoding in cacheprovider
2022-05-09 11:33:05 +03:00
pytest bot 23c8f3d234 [automated] Update plugin list 2022-05-08 00:18:36 +00:00
MatthewFlamm 5f9d68c8d9
Clarify precision when using NUMBER option in --doctest-modules (#9914)
Fix #9892
2022-05-06 20:25:44 -03:00
Peyman Salehi 2f62e6ec96
Fix default encoding in cacheprovider 2022-05-03 20:56:46 +04:30
Anthony Sottile 4ddf48b0a3
Merge pull request #9912 from pytest-dev/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-05-03 11:17:47 -04:00