Commit Graph

14691 Commits

Author SHA1 Message Date
Bruno Oliveira c0843f94e4
Merge pull request #10157 from albertvillanova/patch-2
Fix typo in example/markers documentation
2022-07-23 14:00:29 -03:00
Albert Villanova del Moral 8c5487fd6b
Fix cross-reference in reference/reference docs 2022-07-20 00:01:23 +02:00
Albert Villanova del Moral 4696ba74f9
Fix typo in example/markers docs 2022-07-19 22:16:14 +02:00
Bruno Oliveira 34a285986e
Merge pull request #10143 from sirosen/monkeypatch-ctx-howto 2022-07-15 23:08:21 -03:00
Stephen Rosen b8e2f42ec1 Add monkeypatch.context() to how-to doc intro 2022-07-15 19:26:36 +00:00
Wolfremium 70cac3d464
Explicit note that tmpdir fixture is discouraged in favour of tmp_path #9937 (#10138)
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Co-authored-by: kevin.hierro-ext <kevin.hierro-ext@clarity.ai>
Co-authored-by: Dani Sancas <lord.sancas@gmail.com>
2022-07-15 08:40:18 -03:00
Nipunn Koorapati c1d134172c
Add typing for FixtureRequest.param (#10133)
For now, mark it as Any until #8073 is solved

Fixes #9514
2022-07-14 20:36:05 -03:00
Bruno Oliveira cbcb3a356e
Merge pull request #10132 from hroncok/python3.11.0b4 2022-07-14 08:37:08 -03:00
Miro Hrončok 09b2c95320 Adjust tests for a last minute Python 3.11 change in the traceback format
See https://github.com/python/cpython/issues/93883
and https://github.com/python/cpython/pull/93994

Fixes https://github.com/pytest-dev/pytest/issues/10131
2022-07-13 17:14:37 +02:00
Bruno Oliveira c2b1d5b368
Merge pull request #10127 from pytest-dev/pre-commit-ci-update-config 2022-07-11 19:56:56 -03:00
pre-commit-ci[bot] 5c513a5fb3
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/reorder_python_imports: v3.3.0 → v3.8.1](https://github.com/asottile/reorder_python_imports/compare/v3.3.0...v3.8.1)
- [github.com/asottile/pyupgrade: v2.34.0 → v2.37.1](https://github.com/asottile/pyupgrade/compare/v2.34.0...v2.37.1)
2022-07-11 21:57:36 +00:00
Anthony Sottile 7b9f71d84f
Merge pull request #10123 from nicoddemus/fix-mypy-pre-commit
Fix mypy pre-commit run
2022-07-11 08:47:45 -04:00
Bruno Oliveira 334d6514c6 Fix mypy pre-commit run
This started to fail recently with:

```
mypy.....................................................................Failed
- hook id: mypy
- exit code: 1

src/_pytest/assertion/rewrite.py:284: error: Returning Any from function declared to return "TraversableResources"  [no-any-return]
Found 1 error in 1 file (checked 219 source files)
```

Not sure why that started failing, but seems like ignoring that error specifically is OK.
2022-07-11 08:27:09 -03:00
Bruno Oliveira f6dc71c8de
Merge pull request #10120 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-mock-3.8.2
build(deps): Bump pytest-mock from 3.8.1 to 3.8.2 in /testing/plugins_integration
2022-07-11 08:06:23 -03:00
Bruno Oliveira 8c60fa1ef9
Merge pull request #10121 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-sugar-0.9.5
build(deps): Bump pytest-sugar from 0.9.4 to 0.9.5 in /testing/plugins_integration
2022-07-11 08:06:09 -03:00
Bruno Oliveira b83a74a303
Merge pull request #10122 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-bdd-6.0.1
build(deps): Bump pytest-bdd from 5.0.0 to 6.0.1 in /testing/plugins_integration
2022-07-11 08:05:48 -03:00
dependabot[bot] 9c5b6fbab2
build(deps): Bump pytest-bdd in /testing/plugins_integration
Bumps [pytest-bdd](https://github.com/pytest-dev/pytest-bdd) from 5.0.0 to 6.0.1.
- [Release notes](https://github.com/pytest-dev/pytest-bdd/releases)
- [Changelog](https://github.com/pytest-dev/pytest-bdd/blob/master/CHANGES.rst)
- [Commits](https://github.com/pytest-dev/pytest-bdd/compare/5.0.0...6.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-11 03:02:51 +00:00
dependabot[bot] b1948c60ac
build(deps): Bump pytest-sugar in /testing/plugins_integration
Bumps [pytest-sugar](https://github.com/Teemu/pytest-sugar) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/Teemu/pytest-sugar/releases)
- [Changelog](https://github.com/Teemu/pytest-sugar/blob/master/CHANGES.rst)
- [Commits](https://github.com/Teemu/pytest-sugar/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-11 03:02:49 +00:00
dependabot[bot] da68c9d5bc
build(deps): Bump pytest-mock in /testing/plugins_integration
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from 3.8.1 to 3.8.2.
- [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.8.1...v3.8.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-11 03:02:47 +00:00
Bruno Oliveira 29041e1e1f
Merge pull request #10118 from pytest-dev/update-plugin-list/patch-7dc540f25
[automated] Update plugin list
2022-07-10 07:51:38 -03:00
pytest bot dda7673f57 [automated] Update plugin list 2022-07-10 00:24:23 +00:00
Anthony Sottile 7dc540f258
Merge pull request #10115 from pytest-dev/atomicwrites-windows
replace atomicwrites with os.replace
2022-07-08 22:06:56 -04:00
Anthony Sottile 4cd0322ca1 replace atomicwrites with os.replace 2022-07-08 18:36:10 -07:00
Ronny Pfannschmidt 966d4fb3e4
Merge pull request #10051 from EmptyRabbit/dev_main
Fix stage caplog records not clear
2022-07-08 07:46:10 +02:00
Bruno Oliveira 8726597321
Update changelog/9877.bugfix.rst 2022-07-07 09:39:57 -03:00
EmptyRabbit aa83fa353c
Update changelog/9877.bugfix.rst
Co-authored-by: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
2022-07-07 19:29:50 +08:00
Florian Bruhin 4449bdc068
Remove europython training (#10107) 2022-07-06 13:05:08 +02:00
Bruno Oliveira 929e7d5ae0
Merge pull request #10106 from pytest-dev/dependabot/pip/testing/plugins_integration/django-4.0.6 2022-07-06 07:52:52 -03:00
dependabot[bot] 6d7973942f
build(deps): Bump django in /testing/plugins_integration
Bumps [django](https://github.com/django/django) from 4.0.5 to 4.0.6.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/4.0.5...4.0.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-05 22:37:17 +00:00
Bruno Oliveira 4414c4adae
Merge pull request #10102 from pytest-dev/pre-commit-ci-update-config 2022-07-04 20:27:59 -03:00
pre-commit-ci[bot] b99541e744
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 22.3.0 → 22.6.0](https://github.com/psf/black/compare/22.3.0...22.6.0)
- [github.com/asottile/reorder_python_imports: v3.1.0 → v3.3.0](https://github.com/asottile/reorder_python_imports/compare/v3.1.0...v3.3.0)
2022-07-04 22:38:23 +00:00
Bruno Oliveira 5f57481563
Merge pull request #10099 from pytest-dev/update-plugin-list/patch-b08c1dcf0
[automated] Update plugin list
2022-07-03 09:36:57 -03:00
pytest bot 04de180f41 [automated] Update plugin list 2022-07-03 00:22:59 +00:00
Anthony Sottile b08c1dcf0e
Merge pull request #10093 from pytest-dev/move-changelog-to-bugfix
git mv changelog/3396.{improvement,bugfix}.rst
2022-06-30 09:07:24 -04:00
Anthony Sottile 3e590fe79e git mv changelog/3396.{improvement,bugfix}.rst 2022-06-30 05:47:02 -07:00
Anthony Sottile 7dcabc1f49
Merge pull request #10088 from alicederyn/doctest.importmode
Pass importmode to import_path in DoctestModule
2022-06-29 17:57:37 -04:00
Anthony Sottile 2941da0f2b
Merge pull request #10090 from pytest-dev/update-does-not-raise
update does_not_raise docs now that pytest is 3.7+ only
2022-06-29 14:00:03 -04:00
Anthony Sottile 1b47de7d7f update does_not_raise docs now that pytest is 3.7+ only 2022-06-29 13:13:15 -04:00
Alice Purcell 85000f037f Added Alice Purcell to AUTHORS 2022-06-29 14:39:04 +01:00
Alice Purcell c34eaaaa1c Pass importmode to import_path in DoctestModule
This allows doctest to be used with namespace modules
2022-06-29 14:38:59 +01:00
Bruno Oliveira 06738e36df
Merge pull request #10081 from nicoddemus/unittest-cls-skip-10060 2022-06-28 12:49:50 -03:00
Anthony Sottile 94bc31b07d
Merge pull request #10086 from pytest-dev/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-06-28 11:33:04 -04:00
pre-commit-ci[bot] b961ef5b79
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.2.0 → v4.3.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.2.0...v4.3.0)
- [github.com/asottile/pyupgrade: v2.32.1 → v2.34.0](https://github.com/asottile/pyupgrade/compare/v2.32.1...v2.34.0)
- [github.com/pre-commit/mirrors-mypy: v0.960 → v0.961](https://github.com/pre-commit/mirrors-mypy/compare/v0.960...v0.961)
2022-06-27 20:50:23 +00:00
Bruno Oliveira bd642fac70 Do not call tearDown for skipped unittest.TestCases with --pdb
Fix #10060
2022-06-27 10:33:37 -03:00
Bruno Oliveira da9a2b584e
Merge pull request #10078 from nicoddemus/pathsep-9791 2022-06-27 09:58:38 -03:00
Bruno Oliveira 8bbd35aa69
Merge pull request #10082 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-mock-3.8.1
build(deps): Bump pytest-mock from 3.7.0 to 3.8.1 in /testing/plugins_integration
2022-06-27 07:15:41 -03:00
dependabot[bot] 0b1e9ba270
build(deps): Bump pytest-mock in /testing/plugins_integration
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from 3.7.0 to 3.8.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.7.0...v3.8.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-27 03:02:47 +00:00
Bruno Oliveira f92c4a77ad Use PurePath directly instead of os.path.sep in rewrite.py
Given we are already creating a `PurePath`, just pass the parts directly to it.

This avoids using `os.path.sep`, that although is an official API, seems not to be available in all systems.

Fix #9791
2022-06-26 21:29:05 -03:00
Bruno Oliveira 9a037a5713
Merge pull request #10076 from pytest-dev/update-plugin-list/patch-aafac5578
[automated] Update plugin list
2022-06-26 10:54:01 -03:00
Bruno Oliveira 11fb5cd331
Merge pull request #10054 from SnoopJeDi/doc/xfail-multiple-exceptions
Indicate support for a tuple of exceptions in xfail raises=
2022-06-26 09:54:18 -03:00