Commit Graph

13743 Commits

Author SHA1 Message Date
Bruno Oliveira 16685dc279 Change os.getuid() guard in tmpdir.py
This matches the guard used by typeshed and avoid mypy errors on Windows:

48a346920b/stdlib/os/__init__.pyi (L388)
2021-06-12 12:31:58 -03: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
Anthony Sottile c94766a580
Merge pull request #8738 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-django-4.4.0
Bump pytest-django from 4.3.0 to 4.4.0 in /testing/plugins_integration
2021-06-10 17:42:34 -07:00
dependabot[bot] 85faaf8a1d
Bump pytest-django from 4.3.0 to 4.4.0 in /testing/plugins_integration
Bumps [pytest-django](https://github.com/pytest-dev/pytest-django) from 4.3.0 to 4.4.0.
- [Release notes](https://github.com/pytest-dev/pytest-django/releases)
- [Changelog](https://github.com/pytest-dev/pytest-django/blob/master/docs/changelog.rst)
- [Commits](https://github.com/pytest-dev/pytest-django/compare/v4.3.0...v4.4.0)

---
updated-dependencies:
- dependency-name: pytest-django
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-11 00:18:17 +00:00
Anthony Sottile 5a9139c5ec
Merge pull request #8739 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-cov-2.12.1
Bump pytest-cov from 2.12.0 to 2.12.1 in /testing/plugins_integration
2021-06-10 17:17:18 -07:00
dependabot[bot] b04aa015b9
Bump pytest-cov from 2.12.0 to 2.12.1 in /testing/plugins_integration
Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 2.12.0 to 2.12.1.
- [Release notes](https://github.com/pytest-dev/pytest-cov/releases)
- [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-cov/compare/v2.12.0...v2.12.1)

---
updated-dependencies:
- dependency-name: pytest-cov
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-10 23:10:22 +00:00
Anthony Sottile 657e35618f
Merge pull request #8737 from pytest-dev/dependabot/pip/testing/plugins_integration/django-3.2.4
Bump django from 3.2.3 to 3.2.4 in /testing/plugins_integration
2021-06-10 16:09:40 -07:00
Bruno Oliveira 8010fb9f40
Merge pull request #8749 from beniwohli/fix-at-level-type-hints
updated type hints for caplog.at_level to match caplog.set_level
2021-06-10 19:33:35 -03:00
Benjamin Wohlwend 58036d463d
updated type hints for caplog.at_level to match caplog.set_level
The underlying logging API accepts the log level both as int and
as string.
2021-06-10 09:34:54 +02:00
Bruno Oliveira 992eabc29e
Merge pull request #8747 from asottile/typo-fix
Fix typo in fixture.rst
2021-06-09 19:54:23 -03:00
Jason Haugen 479209bde1 Fix typo in fixture.rst
Example referenced the wrong function name
2021-06-09 15:13:48 -07:00
Bruno Oliveira 68bb0db808
Merge pull request #8742 from pytest-dev/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-06-09 17:23:14 -03:00
pre-commit-ci[bot] 595b7e894c
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.19.0 → v2.19.1](https://github.com/asottile/pyupgrade/compare/v2.19.0...v2.19.1)
2021-06-08 01:55:19 +00:00
dependabot[bot] bce0ceafe4
Bump django from 3.2.3 to 3.2.4 in /testing/plugins_integration
Bumps [django](https://github.com/django/django) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.2.3...3.2.4)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-07 03:01:43 +00:00
pytest bot 50b166ff0b [automated] Update plugin list 2021-06-06 00:17:08 +00:00
Bruno Oliveira 8300b266a8
Merge pull request #8732 from domdfcoding/patch-1
Fix typo (setupttools -> setuptools)
2021-06-05 15:10:24 -03:00
Dominic Davis-Foster 7fb5a9d033
Fix typo (setupttools -> setuptools) 2021-06-05 16:03:59 +01:00
Anthony Sottile bb9683deea
Merge pull request #8729 from asottile/revert-traceback-frame
Revert "Merge pull request #8227 from encukou/defensive-get_source"
2021-06-03 12:46:53 -07:00
Anthony Sottile 77235e2759 Revert "Merge pull request #8227 from encukou/defensive-get_source"
This reverts commit 67af623d9e, reversing
changes made to aead41e449.
2021-06-03 08:45:57 -07:00
Florian Bruhin 9ad726a9a0
Switch to irc.libera.chat (#8722) 2021-06-01 17:34:29 +02:00
Bruno Oliveira cde6920e49
Merge pull request #8719 from pytest-dev/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-05-31 16:34:45 -03:00
pre-commit-ci[bot] c51520ab2a
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 21.5b1 → 21.5b2](https://github.com/psf/black/compare/21.5b1...21.5b2)
- [github.com/asottile/pyupgrade: v2.18.2 → v2.19.0](https://github.com/asottile/pyupgrade/compare/v2.18.2...v2.19.0)
2021-05-31 17:32:52 +00: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
Bruno Oliveira 7ce69347ce
Merge pull request #8717 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-rerunfailures-10.0
Bump pytest-rerunfailures from 9.1.1 to 10.0 in /testing/plugins_integration
2021-05-31 09:30:19 -03:00
Bruno Oliveira 788d8785ce
Merge pull request #8718 from dlax/docs/tmpdir_factory
Fix a typo in documentation about tmpdir_factory
2021-05-31 09:22:26 -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
dependabot[bot] 20f00997ff
Bump pytest-rerunfailures in /testing/plugins_integration
Bumps [pytest-rerunfailures](https://github.com/pytest-dev/pytest-rerunfailures) from 9.1.1 to 10.0.
- [Release notes](https://github.com/pytest-dev/pytest-rerunfailures/releases)
- [Changelog](https://github.com/pytest-dev/pytest-rerunfailures/blob/master/CHANGES.rst)
- [Commits](https://github.com/pytest-dev/pytest-rerunfailures/compare/9.1.1...10.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-31 03:01:08 +00: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
Bruno Oliveira 798bca4076
Merge pull request #8705 from MapleCCC/main
Fix cyclic links in goodpractices.rst
2021-05-26 18:41:13 -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
pre-commit-ci[bot] c5bf5f6fb0
[pre-commit.ci] pre-commit autoupdate (#8699)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/asottile/pyupgrade: v2.16.0 → v2.18.2](https://github.com/asottile/pyupgrade/compare/v2.16.0...v2.18.2)

* [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-26 11:19:45 +03:00
Ran Benita ef9d01826a
Merge pull request #8693 from pytest-dev/update-plugin-list/patch-c198a7a67
[automated] Update plugin list
2021-05-24 19:14:03 +03:00
Ran Benita 847d8f42ea
Merge pull request #8696 from pytest-dev/dependabot/pip/testing/plugins_integration/anyio-curiotrio--3.1.0
Bump anyio[curio,trio] from 3.0.1 to 3.1.0 in /testing/plugins_integration
2021-05-24 19:13:20 +03:00
Ran Benita e6ed28f0e7
Merge pull request #8694 from bluetech/rec-eval-wrapper
code: remove unneeded comparison eval wrapper
2021-05-24 19:12:56 +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
dependabot[bot] 4a472952f7
Bump anyio[curio,trio] in /testing/plugins_integration
Bumps [anyio[curio,trio]](https://github.com/agronholm/anyio) from 3.0.1 to 3.1.0.
- [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.0.1...3.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-24 03:01:18 +00: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
Ran Benita c90fdc684b code: remove unneeded comparison eval wrapper
Given a `RecursionError` traceback, the `Traceback.recursionindex()`
method returns the index of the frame which started the recursion
(repeated set of frames). To do so it attempts to check whether two
frames are equivalent. Just checking the function/line is not enough
because the recursion variable(s) might differ (e.g. imagine the numeric
value in a recursive factorial implementation). So it also compares the
`f_locals` (local variables) of each frame for equivalence.

For some reason, the locals comparison is wrapped in an `eval` whose
purpose is to evaluate the comparison in one of the compared frame's
context (locals + globals in scope). However, I can not think of any way
in which the global scope could affect the evaluation. It would have an
affect when the locals are bound but that's already done. So this seems
unnecessary - remove it.
2021-05-23 20:59:38 +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
Ran Benita ff6d29717c
Merge pull request #8681 from bluetech/ci-permissions
ci: few security/permissions improvements
2021-05-18 22:21:25 +03:00
Ran Benita 864a2bc0a3 ci: use GitHub Actions token instead of `chatops`/`release_notes` secrets
It seems more secure to use the controlled & limited token than an
ambient secret.
2021-05-18 16:05:14 +03:00