Commit Graph

13075 Commits

Author SHA1 Message Date
Anthony Sottile be43c7c67b py36+: remove _pytest.compat.fspath 2020-10-02 19:49:32 -07:00
Anthony Sottile a23666d554
Merge pull request #7838 from asottile/py36_requires_ordered_markup
py36+: remove requires_ordered_markup
2020-10-02 19:48:01 -07:00
Anthony Sottile ced0a52a87
Merge pull request #7837 from asottile/py36_union_pattern_match
py36+: remove workaround for Union[Pattern/Match] bug
2020-10-02 19:47:50 -07:00
Anthony Sottile 2c7b7d8f66
Merge pull request #7836 from asottile/py36_typing_X
py36+: replace typing.X with X
2020-10-02 19:47:42 -07: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 a6ef0f8f67
Merge pull request #7833 from asottile/py36_ModuleNotFoundError
py36+: remove _pytest.compat.MODULE_NOT_FOUND_ERROR
2020-10-02 19:47:18 -07:00
Anthony Sottile 7836c2c371
Merge pull request #7832 from asottile/py36_pathlib2
py36+: remove pathlib2 compatibility shim
2020-10-02 19:47:10 -07:00
Bruno Oliveira 6ee1eadd1c Fake setuptools-scm into using version 6.2.0a1
Due to pytest-rerunfailures latest version requiring 6.1.0, which is not
tagged on master.
2020-10-02 23:40:50 -03:00
Anthony Sottile daba7ceb71 py36+: remove requires_ordered_markup 2020-10-02 15:06:59 -07:00
Anthony Sottile e622cb7c41 py36+: remove workaround for Union[Pattern/Match] bug 2020-10-02 15:06:02 -07:00
Anthony Sottile cf220b92a2 py36+: replace typing.X with X 2020-10-02 15:05:13 -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 1f57fb079d py36+: remove _pytest.compat.MODULE_NOT_FOUND_ERROR 2020-10-02 15:02:45 -07:00
Anthony Sottile 3c93eb0f04 py36+: remove pathlib2 compatibility shim 2020-10-02 14:59:07 -07:00
Anthony Sottile 325b988ca8
Merge pull request #7831 from asottile/py36_drop_in_CI
py36+: drop python3.5 in CI and setup.cfg
2020-10-02 14:55:02 -07:00
Anthony Sottile 179f4326df py36+: drop python3.5 in CI and setup.cfg 2020-10-02 14:00:11 -07:00
Max Voitko cb0a13a523
Fix minor typos in doctest.rst (#7828) 2020-10-02 15:39:15 +02:00
Ran Benita b250c9d615
Merge pull request #7813 from bluetech/findpaths-confusion
findpaths: fix regression causing incorrect rootdir to be determined
2020-09-30 13:21:18 +03:00
Ran Benita 3ecdad67b7 terminal: improve condition on whether to display testpaths in header
Make it match better the condition on whether testpaths is used (found
in config/__init__.py).
2020-09-29 15:23:47 +03:00
Ran Benita 61f80a783a terminal: fix crash in header reporting when absolute testpaths is used
Regressed in 6.1.0 in 62e249a1f9.
The `x` is an `str` but is expected to be a `pathlib.Path`. Not caught
by mypy because `config.getini()` returns `Any`.

Fix by just removing the `bestrelpath` call:

- testpaths are always relative to the rootdir, it thus would be very
  unusual to specify an absolute path there.

- The code was wrong even before the regression: `py.path.local`'s
  `bestrelpath` function expects a `py.path.local`, not an `str`. But it
  had some weird `try ... except AttributeError` fallback which just
  returns the argument, i.e. it was a no-op. So there is no behavior
  change.

- It seems reasonable to me to just print the full path if that's what
  the ini specifies.
2020-09-29 15:23:47 +03:00
Ran Benita db08c7fbb0 pathlib: improve comments on commonpath and bestrelpath 2020-09-29 13:11:47 +03:00
Hugo van Kemenade 875f226d3b Smoke test pytest-rerunfailures 2020-09-29 12:47:46 +03:00
Ran Benita cd67c2a8cf
Merge pull request #7802 from bluetech/bump-attrs
Bump attrs requirement from >=17.4.0 to >=19.2.0
2020-09-28 19:30:58 +03:00
Ran Benita 4a9192f727 findpaths: fix regression causing incorrect rootdir to be determined
When switching from py.path.local to pathlib (70f3ad1c1f),
`local.parts(reverse=True)` was translated incorrectly, leading to the
wrong rootdir being determined in some non-trivial cases where parent
directories have config files as well.
2020-09-28 19:13:01 +03:00
Jakob van Santen 91fa11bed0
python_api: let approx() take nonnumeric values (#7710)
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-09-28 12:17:23 -03: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 32bb8f3a63 Bump attrs requirement from >=17.4.0 to >=19.2.0
This allows us to remove the `ATTRS_EQ_FIELD` thing which is causing
some annoyance.
2020-09-27 13:17:59 +03:00
Anthony Sottile 28ba9ab737
Merge pull request #7801 from pytest-dev/fix-bot-typo
Fix typos in pytestbot
2020-09-26 15:53:14 -07:00
Hugo van Kemenade 14de6781d8
Fix typos in pytestbot 2020-09-26 23:46:58 +03:00
Ran Benita e0ea00a70d
Merge pull request #7798 from bluetech/cherry-pick-release
Cherry-pick 6.1.0 release notes
2020-09-26 21:24:11 +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
Ran Benita 0b327cc75b
Merge pull request #7796 from bluetech/changelog-cleanups
changelog: some consistency cleanups
2020-09-26 20:13:45 +03:00
Ran Benita d3c746eb8e changelog: some consistency cleanups 2020-09-26 20:04:17 +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 3db24893b4
Merge pull request #7784 from nicoddemus/use-new-pip-solver-7783
Use new pip resolver in plugins tox env
2020-09-23 09:32:02 -03:00
Bruno Oliveira 8215625135 Use new pip resolver in plugins tox env
Fix #7783
2020-09-23 09:16:48 -03:00
Ran Benita 5cfd7c0ddd
Merge pull request #7780 from bluetech/final
Mark some public and to-be-public classes as `@final`
2020-09-23 13:42:11 +03:00
Ran Benita a99ca879e7 Mark some public and to-be-public classes as `@final`
This indicates at least for people using type checkers that these
classes are not designed for inheritance and we make no stability
guarantees regarding inheritance of them.

Currently this doesn't show up in the docs. Sphinx does actually support
`@final`, however it only works when imported directly from `typing`,
while we import from `_pytest.compat`.

In the future there might also be a `@sealed` decorator which would
cover some more cases.
2020-09-22 12:40:40 +03:00
Bruno Oliveira 050c2df737
Use multiple issue template types and mention Discussions (#7739) 2020-09-21 20:22:25 +02: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
Ran Benita 8eefe4eaf5
Merge pull request #7741 from bluetech/releasing-order
RELEASING: ~~first merge PR, then tag~~ clarify where to push the tag
2020-09-19 22:01:00 +03:00
Sorin Sbarnea b031a7cecf
Smoke tests for assorted plugins (#7721)
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
2020-09-19 15:56:52 -03:00
Ran Benita 027415502a RELEASING: clarify where to push the tag 2020-09-19 21:35:17 +03:00
Ran Benita 9f164b7227
Merge pull request #7766 from nicoddemus/backporting-docs
Add guidelines section about backporting
2020-09-19 21:18:41 +03:00
Ran Benita 4e460cdd9e
Merge pull request #7773 from nicoddemus/xml-properties-xdist-docs
Warning about record_testsuite_property not working with xdist
2020-09-19 21:06:40 +03:00
Florian Bruhin 89305e7b09
Improve output for missing config keys (#7572)
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-09-19 12:57:29 -03:00
Bruno Oliveira c4ce5f2c98 Warning about record_testsuite_property not working with xdist
Related to #7767
2020-09-19 12:36:08 -03:00