Commit Graph

15177 Commits

Author SHA1 Message Date
pre-commit-ci[bot] 7008385253
[pre-commit.ci] pre-commit autoupdate (#11195)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 23.3.0 → 23.7.0](https://github.com/psf/black/compare/23.3.0...23.7.0)
- [github.com/asottile/blacken-docs: 1.14.0 → 1.15.0](https://github.com/asottile/blacken-docs/compare/1.14.0...1.15.0)
- [github.com/asottile/pyupgrade: v3.8.0 → v3.9.0](https://github.com/asottile/pyupgrade/compare/v3.8.0...v3.9.0)

* Update .pre-commit-config.yaml

* Update .pre-commit-config.yaml

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2023-07-11 11:37:07 +00:00
Ran Benita b25a3adff5
Merge pull request #11192 from bluetech/py38-extra
A few more Python>=3.8 simplifications
2023-07-11 01:13:17 +03:00
Ran Benita f1c9570a0e A few more Python>=3.8 simplifications 2023-07-10 23:20:11 +03:00
dependabot[bot] b20e7f6d0c
build(deps): Bump anyio[curio,trio] in /testing/plugins_integration (#11191)
Bumps [anyio[curio,trio]](https://github.com/agronholm/anyio) from 3.7.0 to 3.7.1.
- [Changelog](https://github.com/agronholm/anyio/blob/master/docs/versionhistory.rst)
- [Commits](https://github.com/agronholm/anyio/compare/3.7.0...3.7.1)

---
updated-dependencies:
- dependency-name: anyio[curio,trio]
  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-07-10 10:23:47 -03:00
dependabot[bot] b91d5a3112
build(deps): Bump pytest-rerunfailures in /testing/plugins_integration (#11190)
Bumps [pytest-rerunfailures](https://github.com/pytest-dev/pytest-rerunfailures) from 11.1.2 to 12.0.
- [Changelog](https://github.com/pytest-dev/pytest-rerunfailures/blob/master/CHANGES.rst)
- [Commits](https://github.com/pytest-dev/pytest-rerunfailures/compare/11.1.2...12.0)

---
updated-dependencies:
- dependency-name: pytest-rerunfailures
  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-07-10 10:23:33 -03:00
dependabot[bot] 4e75bff71a
build(deps): Bump pypa/gh-action-pypi-publish from 1.8.5 to 1.8.7 (#11189)
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.8.5 to 1.8.7.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.8.5...v1.8.7)

---
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-07-10 10:23:12 -03:00
antosikv 99ab8ae884
Clarify docs for pytest.main default behavior (#11187)
Add explicit mentions of the default behavior to both API reference and
how-to section about ways to invoke pytest.

Co-authored-by: Ran Benita <ran@unusedvar.com>
2023-07-09 12:30:33 -03:00
Ran Benita 782cacf86b
Merge pull request #11184 from pytest-dev/update-plugin-list/patch-fd7a4d242
[automated] Update plugin list
2023-07-09 17:09:12 +03:00
pytest bot a3b4220d76 [automated] Update plugin list 2023-07-09 00:29:15 +00:00
Bruno Oliveira fd7a4d2429
Merge pull request #11106 from bluetech/docs-ref-collection-objs
reference: improve the node types docs a bit
2023-07-08 15:41:22 -03:00
Ran Benita b73ec8e5d1
doc: fix EncodingWarnings in examples (#11158)
Otherwise the warnings show in the regen output.
2023-07-08 15:40:05 -03:00
Zac Hatfield-Dodds d790e96765
Merge pull request #11178 from kenny-y-dev/add-none-support-approxmapping 2023-07-08 10:40:42 -07:00
Kenny Y d4265448a5
Update src/_pytest/python_api.py
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2023-07-08 08:41:42 -04:00
Kenny Y db37e34613
Merge branch 'main' into add-none-support-approxmapping 2023-07-07 15:55:19 -04:00
Kenny Y c5b13099e6
Fix error assertion handling in approx when None in dict comparison
Dict comparsion in the ApproxMapping class did not check if values were None before attempting to subtract for max_abs_diff stat, which was throwing an TypeError instead of being handled by pytest error assertion. Check for None has been added before these calculations, so that None will properly show as Obtained/Expected in pytest assert message
2023-07-07 14:42:59 -04:00
Zac Hatfield-Dodds 97ed533f63
Merge pull request #11169 from hugovk/test-me-rm-3.7 2023-07-06 22:28:44 -07:00
Ran Benita f5a9aa0b84
Merge pull request #11175 from pytest-dev/dependabot/pip/testing/plugins_integration/django-4.2.3
build(deps): Bump django from 4.2.2 to 4.2.3 in /testing/plugins_integration
2023-07-06 11:51:44 +03:00
Zac Hatfield-Dodds 901316b3f4
Merge pull request #8502 from mickeypash/patch-2 2023-07-06 00:28:20 -07:00
Zac Hatfield-Dodds b81003f6fb Incorporate legend into main table 2023-07-06 00:04:15 -07:00
mickeypash ddd773ecb1 [docs] add table nose x pytest naming comparison 2023-07-05 23:46:32 -07:00
dependabot[bot] 44604f49cd
build(deps): Bump django in /testing/plugins_integration
Bumps [django](https://github.com/django/django) from 4.2.2 to 4.2.3.
- [Commits](https://github.com/django/django/compare/4.2.2...4.2.3)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-05 22:57:45 +00:00
Zac Hatfield-Dodds 2203897086
Merge pull request #11173 from bluetech/enc-warning-detox
tox: turn off PYTHONWARNDEFAULTENCODING for pre-commit, sphinx etc.
2023-07-05 09:48:26 -07:00
Ran Benita 119cec0279 tox: turn off PYTHONWARNDEFAULTENCODING for pre-commit, sphinx etc.
Fix #11157.
2023-07-05 19:05:08 +03:00
Florian Bruhin b5bc53e441
Update open trainings (#11171) 2023-07-04 23:19:24 +02:00
Zac Hatfield-Dodds 084d756ae6
Merge pull request #11143 from tushar-deepsource/patch-1 2023-07-04 10:47:13 -07:00
Zac Hatfield-Dodds d7dbadbffc
Merge pull request #11160 from lesnek/ml/fix/warinings-recorder-pop 2023-07-04 10:20:04 -07:00
Zac Hatfield-Dodds cb732f7f49
Merge branch 'main' into patch-1 2023-07-04 10:17:06 -07:00
Zac Hatfield-Dodds 7775e494b1 Further tweaks from code review 2023-07-04 10:00:29 -07:00
Hugo van Kemenade 1f5058e972 Use same Black version for blacken-docs as regular Black check 2023-07-04 18:55:08 +03:00
Hugo van Kemenade 6baf9f2d31 Update docs and code after dropping EOL 3.7 2023-07-04 18:55:08 +03:00
Lesnek c4876c7106 chore(CR): Add changes from code review 2023-07-04 11:49:11 +02:00
Milan Lesnek 6badb6f01e Apply suggestions from code review
chore(changelog): describe better the fix

Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
2023-07-04 10:30:19 +02:00
Lesnek 4517af1e28 test(warnings-recorder): Add attribute error test 2023-07-04 10:30:19 +02:00
Lesnek 3d0dedb5ec test(warnings-recorder): Add attribute error test 2023-07-04 10:30:19 +02:00
Lesnek 7b7bd304aa fix(warnings-recorder): Add handling of rest 2023-07-04 10:30:19 +02:00
Lesnek 2706271f66 test(warnings-recorder): Add another warning 2023-07-04 10:30:19 +02:00
Lesnek 8ac3c645fa fix(warnings-recorder): Match also subclass of warning in pop 2023-07-04 10:30:19 +02:00
Lesnek 18e87c9831 test(warnings-recorder): Add non working subclass behaviour of pop 2023-07-04 10:30:19 +02:00
pre-commit-ci[bot] 6995257cf4
[pre-commit.ci] pre-commit autoupdate (#11165)
updates:
- [github.com/asottile/pyupgrade: v3.7.0 → v3.8.0](https://github.com/asottile/pyupgrade/compare/v3.7.0...v3.8.0)
- [github.com/asottile/setup-cfg-fmt: v2.3.0 → v2.4.0](https://github.com/asottile/setup-cfg-fmt/compare/v2.3.0...v2.4.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-07-04 07:00:14 +00:00
Ronny Pfannschmidt bea56b30af
Switch to deploy environment and configure for pypi oidc (#10925)
Closes #10871
Closes #10870
2023-07-03 12:52:58 -03:00
github-actions[bot] b847084224
[automated] Update plugin list (#11159)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-07-03 11:45:17 -03:00
Akhilesh Ramakrishnan 024e62e6d2
Added Akhilesh Ramakrishnan to AUTHORS (#11153)
* Added Akhilesh Ramakrishnan to AUTHORS

PR#10338

* Fix typo in changelog
2023-07-03 13:49:50 +02:00
Ronny Pfannschmidt f9410fddcd
Merge pull request #11155 from RonnyPfannschmidt/fix-10447-maker-mro-order-needs-reverse
fix #10447 - consider marks in reverse mro order to give base classes priority
2023-07-02 22:23:00 +02:00
Ronny Pfannschmidt 561f1a993b fix #10447 - consider marks in reverse mro order to give base classes priority 2023-07-01 22:27:18 +02:00
Bruno Oliveira b77d0deaf5
Fix duplicated imports with importlib mode and doctest-modules (#11148)
The initial implementation (in #7246) introduced the `importlib` mode, which
never added the imported module to `sys.modules`, so it included a test
to ensure calling `import_path` twice would yield different modules.

Not adding modules to `sys.modules` proved problematic, so we began to add the imported module to `sys.modules`
in #7870, but failed to realize that given we are now changing `sys.modules`, we might
as well avoid importing it more than once.

Then #10088 came along, passing `importlib` also when importing application modules
(as opposed to only test modules before), which caused problems due to imports
having side-effects and the expectation being that they are imported only once.

With this PR, `import_path` returns the module immediately if already in
`sys.modules`.

Fix #10811
Fix #10341
2023-07-01 15:37:46 +00:00
akhilramkee 2f7415cfbc
Add child modules as attributes of parent modules. (#10338)
Failing to add child modules as attributes of parent module will prevent them from being accessible through parent module.

Fix #10337
2023-07-01 15:12:41 +00:00
Zac Hatfield-Dodds ba60649680
Merge pull request #11129 from Cheukting/warn_in_expt 2023-06-30 21:58:42 -07:00
Zac Hatfield-Dodds 679bd6f2ed
Merge pull request #10937 from reaganjlee/re-emit 2023-06-30 21:21:37 -07:00
Zac Hatfield-Dodds a50ea1b8e7
Merge pull request #11152 from Zac-HD/drop-py37 2023-06-30 20:56:47 -07:00
Zac Hatfield-Dodds 0353a94cd1 Explicit GC for PyPy, take 2 2023-06-30 20:33:12 -07:00