Commit Graph

14018 Commits

Author SHA1 Message Date
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
Ran Benita 6bc6ec323a ci: reduce workflow permissions
Decrease security exposure by restricting what the code executing in the
actions is allowed to do (in terms of GitHub operations).
2021-05-18 16:05:14 +03:00
Ran Benita e2567a680e scripts: improve upload-coverage.sh
Mostly, verify the bash uploader hash and make it more strict and
verbose.
2021-05-18 16:05:14 +03:00
Anthony Sottile d52cd08757
Merge pull request #8687 from pytest-dev/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-05-17 22:11:31 -07:00
pre-commit-ci[bot] 249c5b37dd
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/pre-commit-hooks: v3.4.0 → v4.0.1](https://github.com/pre-commit/pre-commit-hooks/compare/v3.4.0...v4.0.1)
- [github.com/asottile/pyupgrade: v2.15.0 → v2.16.0](https://github.com/asottile/pyupgrade/compare/v2.15.0...v2.16.0)
2021-05-17 17:29:57 +00:00
Bruno Oliveira 0d502328ea
Merge pull request #8653 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-mock-3.6.1 2021-05-17 08:21:42 -03:00
dependabot[bot] 53a74feea7
Bump pytest-mock from 3.6.0 to 3.6.1 in /testing/plugins_integration
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from 3.6.0 to 3.6.1.
- [Release notes](https://github.com/pytest-dev/pytest-mock/releases)
- [Changelog](https://github.com/pytest-dev/pytest-mock/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-mock/compare/v3.6.0...v3.6.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 10:53:38 +00:00
Bruno Oliveira 88944bec6a
Merge pull request #8684 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-django-4.3.0
Bump pytest-django from 4.2.0 to 4.3.0 in /testing/plugins_integration
2021-05-17 07:52:55 -03:00
dependabot[bot] 8872e8e7c7
Bump pytest-django from 4.2.0 to 4.3.0 in /testing/plugins_integration
Bumps [pytest-django](https://github.com/pytest-dev/pytest-django) from 4.2.0 to 4.3.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.2.0...v4.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 10:51:47 +00:00
Bruno Oliveira eb7acba9e9
Merge pull request #8683 from pytest-dev/dependabot/pip/testing/plugins_integration/django-3.2.3
Bump django from 3.2.2 to 3.2.3 in /testing/plugins_integration
2021-05-17 07:51:36 -03:00
Bruno Oliveira e59d0c461b
Merge pull request #8682 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-cov-2.12.0
Bump pytest-cov from 2.11.1 to 2.12.0 in /testing/plugins_integration
2021-05-17 07:51:24 -03:00
Olga Matoula 3f414d7bbe Ignore depredcated warns(None) overload errors from mypy 2021-05-17 09:50:59 +01:00
Olga Matoula dd8ad3fa9c Split warns matching string in multiple lines 2021-05-17 09:23:08 +01:00
dependabot[bot] 06718da5d6
Bump django from 3.2.2 to 3.2.3 in /testing/plugins_integration
Bumps [django](https://github.com/django/django) from 3.2.2 to 3.2.3.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.2.2...3.2.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 03:01:19 +00:00
dependabot[bot] c73e354019
Bump pytest-cov from 2.11.1 to 2.12.0 in /testing/plugins_integration
Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 2.11.1 to 2.12.0.
- [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.11.1...v2.12.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-17 03:01:15 +00:00
Olga Matoula 2414d23c78 Remove default arg from overloaded warns 2021-05-16 13:44:56 +01:00
Olga Matoula 24ad886b15 Remove the option to pass None in warns() 2021-05-16 12:10:32 +01:00
Olga Matoula dbe66d97b4 Add better warning msg for deprecated warns(None) 2021-05-16 12:07:39 +01:00
Bruno Oliveira b8f1b7cdc6
Merge pull request #8680 from pytest-dev/update-plugin-list/patch-c516dba
[automated] Update plugin list
2021-05-15 23:47:35 -03:00
pytest bot a69ed66c2e [automated] Update plugin list 2021-05-16 00:10:52 +00:00
pre-commit-ci[bot] 6ae71a2c2b [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2021-05-15 17:51:55 +00:00
Olga Matoula 8b2f83772d Catch any warning on warns with no arg passed 2021-05-15 18:50:39 +01:00
Rahul Kumaresan c516dba69a
add feature to view fixture source location in invocations with --fixtures-per-test option (#8626)
* add feature to view fixture source location in invocations with --fixtures-per-test option

* remove unrelated changes to show_fixtures_per_test::test_doctest_items

* eshew the extraneous else in _show_fixtures_per_test.write_fixture

* enable the accommodation of multi-line docstring with --fixtures-per-test option

* add feature to view fixture source location in invocations with --fixtures

* add colour encoding to fixture location paths

* add changelog for #8606 fixing

* [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-14 14:38:55 +02:00
Zack Kneupper 33c6ad5bf7
Replace some for loops, and other minor changes (#8660)
* Replace for loop using the  operator

* Replace for loop with a generator expression inside any()

* Replace for loop with a dictionary comprehension

* Use list comprehension

* Simplify arguments for range()

* Change newfuncargs variable to in-line dictionary comprehension

* is_ancestor: return base.is_relative_to(query)

* Remove unneeded import of pathlib

* Try using PurePath

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Import PurePath on new line

* Revert and remove is_relative_to

Co-authored-by: Zachary Kneupper <zacharykneupper@Zacharys-MBP.lan>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-05-14 09:32:50 +02:00
Ran Benita 364bbe42fc
Merge pull request #8649 from Saiprasad16/main
UPDATE LICENSE
2021-05-13 17:34:18 +03:00
Ran Benita c5de274136
Merge pull request #8650 from pytest-dev/update-plugin-list/patch-3ae0103
[automated] Update plugin list
2021-05-13 17:33:22 +03:00