Commit Graph

15447 Commits

Author SHA1 Message Date
Ran Benita d2b5177dd6 fixtures: avoid some redundant work in `_fillfixtures` 2023-09-05 22:15:37 +03:00
Ran Benita 65c01f531b fixtures: use the item `fixturenames` in `request.fixturenames`
`_pyfuncitem.fixturenames` is just an alias for
`_pyfuncitem._fixtureinfo.names_closure` (at least in core pytest), so
let's do the less abstraction-breaking thing.
2023-09-05 22:15:37 +03:00
Ran Benita 82bd63d318 doctest: add `fixturenames` field to `DoctestItem`
The field is used in `_fillfixtures`, in preference to
`request.fixturenames`, which also includes already-computed which is
not needed.
2023-09-05 22:15:37 +03:00
Ran Benita d4872f5df7 fixtures: tiny code cleanup 2023-09-05 22:15:37 +03:00
Ran Benita 8d815ca55b python: type some CallSpec2 fields as immutable
Knowing that a field is immutable makes it easier to understand the
code.
2023-09-05 22:15:37 +03:00
pre-commit-ci[bot] 8032d21271
[pre-commit.ci] pre-commit autoupdate (#11389)
updates:
- [github.com/PyCQA/autoflake: v2.2.0 → v2.2.1](https://github.com/PyCQA/autoflake/compare/v2.2.0...v2.2.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-09-05 10:09:33 -03:00
dependabot[bot] 9c8937b480
build(deps): Bump pytest-html in /testing/plugins_integration (#11384)
Bumps [pytest-html](https://github.com/pytest-dev/pytest-html) from 3.2.0 to 4.0.0.
- [Release notes](https://github.com/pytest-dev/pytest-html/releases)
- [Changelog](https://github.com/pytest-dev/pytest-html/blob/master/docs/changelog.rst)
- [Commits](https://github.com/pytest-dev/pytest-html/compare/v3.2.0...4.0.0)

---
updated-dependencies:
- dependency-name: pytest-html
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-04 08:08:10 -03:00
dependabot[bot] 0d8b87f161
build(deps): Bump anyio[curio,trio] in /testing/plugins_integration (#11383)
Bumps [anyio[curio,trio]](https://github.com/agronholm/anyio) from 3.7.1 to 4.0.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.7.1...4.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-04 08:08:01 -03:00
dependabot[bot] 65c73a09e7
build(deps): Bump twisted in /testing/plugins_integration (#11385)
Bumps [twisted](https://github.com/twisted/twisted) from 22.8.0 to 23.8.0.
- [Release notes](https://github.com/twisted/twisted/releases)
- [Changelog](https://github.com/twisted/twisted/blob/trunk/NEWS.rst)
- [Commits](https://github.com/twisted/twisted/compare/twisted-22.8.0...twisted-23.8.0)

---
updated-dependencies:
- dependency-name: twisted
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-04 08:07:56 -03:00
Israel Fruchter 917ce9aa01
Fix user_properties not saved to XML if fixture errors during teardown
Move handling of user_properties to `finalize()`.

Previously if a fixture failed during teardown, `pytest_runtest_logreport` would not be called with "teardown", resulting in the user properties not being saved on the JUnit XML file.

Fixes: #11367
2023-09-03 14:33:54 -03:00
github-actions[bot] 4e3a0874df
[automated] Update plugin list (#11380)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-09-02 22:13:17 -03:00
Bruno Oliveira ba0da81f88
Merge pull request #11379 from nicoddemus/cherry-pick-release
Merge pull request #11377 from pytest-dev/release-7.4.1
2023-09-02 13:21:07 -03:00
Bruno Oliveira f08782d8d0 Merge pull request #11377 from pytest-dev/release-7.4.1
Prepare release 7.4.1

(cherry picked from commit 82eb86f707cac79f33d0ff69723ccf1cea7e75f7)
2023-09-02 12:45:58 -03:00
dependabot[bot] 5b528bd131
build(deps): Bump pypa/gh-action-pypi-publish from 1.8.8 to 1.8.10 (#11310)
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.8.8 to 1.8.10.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.8.8...v1.8.10)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-02 12:04:30 -03:00
Bruno Oliveira e4794b26b2
Merge pull request #11378 from nicoddemus/improve-ci-workflow
Improve CI workflow
2023-09-02 11:59:25 -03:00
Bruno Oliveira ab6cae2126 Improve CI workflow
* Build the package only once, and test on all platforms.
* Deploy is now triggered manually via an Action, which is then responsible for tagging the repository after the package has been uploaded successfully.
* Drop 'docs': we nowadays rely on readthedocs preview PR builds.
2023-09-02 10:29:02 -03:00
Sourabh Beniwal afb8d66e42
Update CONTRIBUTING.rst (#11368)
Chnaged Status: easy to good first issue, and updated the URL
2023-08-30 11:52:14 +00:00
Sean Patrick Malloy 76ba7db6ce
Improve docs for last-failed-no-failures
Improve documentation for last-failed-no-failures to make the different options and the functionality more clear.

Closes #11354
2023-08-29 00:14:45 +00:00
Ran Benita 941b203c94
Merge pull request #11360 from seanjedi/issue_11356-fixing-precommit-issue-with-flake8
fix: fixing an issue with pre-commit with mypy and flake8
2023-08-28 11:26:37 +03:00
Sean Malloy 19d6b12b2a fix: fixing an issue with pre-commit with mypy and flake8 2023-08-27 15:03:42 -07:00
github-actions[bot] 17e8f2b3fc
[automated] Update plugin list (#11358)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-08-27 11:29:17 -03:00
Warren Markham ff23347f1f
Fix platform-dependent type-check errors (#11345)
Use more explicit `sys.platform` checks, instead of the previous check using `in`, which mypy understands.

Fixes #11343
2023-08-27 09:40:24 -03:00
Ran Benita 00fedcc439
Merge pull request #11353 from bluetech/pluggy-typing
Fixes for typed pluggy
2023-08-26 22:59:35 +03:00
Ran Benita 77f7f59b2a Fixes for typed pluggy
Since version 1.3 pluggy added typing, which requires some fixes to
please mypy.
2023-08-26 22:13:24 +03:00
Jon Parise 7500fe44b2
Correct the spelling of ArgSource.INVOCATION_DIR (#11333)
Config.ArgsSource.INCOVATION_DIR remains as a backwards compatibility
alias.
2023-08-23 09:21:17 +00:00
Ha Pam 23b899f31f
Fix a typo in anatomy.rst (#11341) 2023-08-23 10:17:09 +02:00
Ran Benita 43d1398fc7
Merge pull request #11334 from WarrenTheRabbit/fix-docstring-spelling-in-pytester-1
doc: fix docstring spelling in pytester
2023-08-22 14:44:06 +03:00
Zac Hatfield-Dodds 03832fa31e
Merge pull request #11326 from DetachHead/DetachHead-patch-1
use `if not TYPE_CHECKING` on `pytest.__getattr__` to prevent type checkers from using it
2023-08-22 03:53:46 -07:00
pre-commit-ci[bot] 8f36fd5454
[pre-commit.ci] pre-commit autoupdate (#11335)
updates:
- [github.com/asottile/blacken-docs: 1.15.0 → 1.16.0](https://github.com/asottile/blacken-docs/compare/1.15.0...1.16.0)
- [github.com/pre-commit/mirrors-mypy: v1.5.0 → v1.5.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.5.0...v1.5.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-22 08:10:48 +00:00
DetachHead cada6c105a
ignore mypy error on deprecated `Instance` usage 2023-08-22 17:57:59 +10:00
WarrenTheRabbit 3f446b68fd
doc: fix docstring spelling in pytester 2023-08-22 14:36:39 +10:00
Zac Hatfield-Dodds 050f402816
Merge pull request #11308 from reaganjlee/iter-reporting
Improve reporting from __iter__ exceptions
2023-08-21 16:27:42 -07:00
Reagan Lee d1722d5c18 fix test for codecov 2023-08-21 15:49:39 -07:00
github-actions[bot] 4deb38b2ed
[automated] Update plugin list (#11329)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-08-21 13:19:58 +00:00
Ran Benita 370eacd3ca
doc/reference: replace Unicode dashes with ascii `-` in cli flags (#11323) 2023-08-21 14:40:03 +02:00
DetachHead 010e1742d8
use python 3.11 for update-plugin-list (#11328) 2023-08-21 12:29:41 +00:00
Ran Benita 6e5f10b28f
Merge pull request #11320 from ubaumann/add_nuts
add nuts to plugin list
2023-08-21 14:50:31 +03:00
pre-commit-ci[bot] dd5ae0c3b8 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-08-21 08:03:06 +00:00
DetachHead fc653d0d12
use `if not TYPE_CHECKING` on `pytest.__getattr__` to prevent type checkers from using it 2023-08-21 18:00:28 +10:00
Tyler Smart a357c7abc8 Ignore dip in branch coverage (since py3.13+ isn't tested in CI) 2023-08-20 20:55:30 -06:00
Reagan Lee 61133ba83d un-iterable fix 2023-08-20 14:46:09 -07:00
Reagan Lee 049eec8474 Revert iter raises checks
This reverts commit e938580257.

Revert "improve error msg and test"

This reverts commit c0cf822ca1.

Revert "error msg"

This reverts commit ec1053cc16.

Revert "changelog"

This reverts commit d2dc8a70b5.

Revert "simplify code / take out user-gen typeerror case"

This reverts commit b9cb87d862.
2023-08-20 14:06:42 -07:00
Ran Benita 37bb186175
Merge pull request #11322 from bluetech/testing-norecursedirs
testing: add `.*` to `norecursedirs`
2023-08-20 16:37:16 +03:00
Ran Benita 3cb3cd1a08 testing: add `.*` to `norecursedirs`
Setting `norecursedirs` overrides the default, so we end up scanning
dot-directories and such which slows down collection unnecessarily
(150ms on my working directory).
2023-08-20 12:16:38 +03:00
Tyler Smart 7a625481da PR suggestions 2023-08-19 22:20:40 -06:00
Ran Benita 0ddfdfcc04
Merge pull request #11321 from tjsmart/fix-doctesting
Add doctesting-coverage to envlist
2023-08-20 00:26:42 +03:00
Tyler Smart 87bfc83aa0 Add doctesting-coverage to envlist 2023-08-19 12:18:17 -06:00
Tyler Smart ebd571bb18 Move _from_module override to pre-existsing DocTestFinder subclass 2023-08-19 12:04:59 -06:00
ubaumann 176d728b7b
add nuts to plugin list
Adding https://github.com/network-unit-testing-system/nuts to the plugin list.
2023-08-18 23:34:40 +02:00
Tyler Smart d4fb6ac9f7 Fix doctest collection of `functools.cached_property` objects. 2023-08-16 00:55:16 -06:00