github-actions[bot]
4a46ee8bc9
[automated] Update plugin list ( #10699 )
...
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-01-30 10:15:02 -03:00
Teejay
5dbfb8e108
Fix fixtures named teardown being considered by nose ( #10696 )
...
Closes #10597
2023-01-27 14:33:46 -03:00
vin01
86a1beba07
Clarify docs for `match` regarding escaping ( #10695 )
...
Add example using `re.escape` to escape arbitrary literal strings which might contain regular expression characters like `.` or `)`.
Closes #10595
2023-01-27 08:11:00 -03:00
Jay
ca40380e99
Add check for zero denominator in approx ( #10624 )
...
Closes #10533
2023-01-24 07:07:42 -03:00
Bruno Oliveira
05eee78aaa
Merge pull request #10599 from pytest-dev/fix-update-plugin-list-workflow
...
Fix update-plugin-list workflow due to new 'packaging'
2023-01-23 17:55:45 -03:00
Ran Benita
02893139f9
Merge pull request #10680 from bluetech/capture-typing
...
capture: improve typing
2023-01-23 14:38:28 +02:00
Ran Benita
8c53dbf9d7
capture: fix pyright type error
...
This is OK in mypy, but doesn't hurt to fix.
2023-01-23 14:12:01 +02:00
Ran Benita
54b8b40f83
capture: improve NoCapture typing
2023-01-23 14:12:01 +02:00
Ran Benita
54911acf8d
capture: improve `captureclass` typing
...
Previously, the any `captureclass` arguments were Any. We need to
introduce another common base class to fix this.
2023-01-23 14:12:01 +02:00
Ran Benita
c746d2b016
capture: improve `SysCapture`/`FDCapture` typing
...
Instead of `SysCapture`/`FDCapture` inheriting from
`SysCaptureBinary`/`FDCaptureBinary`, have both inherit from a common
`SysCaptureBase`/`FDCaptureBase`. This fixes a Liskov substitution
violation.
2023-01-23 14:12:01 +02:00
Ran Benita
a3693ce503
capture: improve `DontReadFromInput` typing
...
Have `DontReadFromInput` inherit from `TextIO`, ensuring it's fully
compatible with `sys.stdin` (which has type `TextIO`).
2023-01-23 14:12:01 +02:00
Yannick PÉROUX
af4143729f
Allow spaces in -p arguments ( #10658 )
2023-01-21 08:22:44 -03:00
q0w
bd7919e03d
Initialize args and args_source during Config.__init__
...
Closes #10626
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2023-01-21 08:19:54 -03:00
Ran Benita
7d4b40337b
capture: fix some Anys
2023-01-21 10:39:58 +02:00
Ran Benita
6a714d7b70
capture: `CaptureResult` can be a namedtuple again ( #10678 )
...
mypy now supports generic NamedTuple.
2023-01-21 09:39:58 +02:00
Ran Benita
5a23eeff7a
Merge pull request #10668 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-rerunfailures-11.0
...
build(deps): Bump pytest-rerunfailures from 10.3 to 11.0 in /testing/plugins_integration
2023-01-20 11:23:54 +02:00
Ran Benita
310b67b227
Drop attrs dependency, use dataclasses instead ( #10669 )
...
Since pytest now requires Python>=3.7, we can use the stdlib attrs
clone, dataclasses, instead of the OG package.
attrs is still somewhat nicer than dataclasses and has some extra
functionality, but for pytest usage there's not really a justification
IMO to impose the extra dependency on users when a standard alternative
exists.
2023-01-20 11:13:36 +02:00
Ramsey
4d4ed42c34
Fix crash if `--cache-show` and `--help` are passed at the same time
...
Closes #10592
2023-01-19 09:44:57 -03:00
Ronny Pfannschmidt
096b942ec4
Merge pull request #10660 from ikonst/2023-01-13-raises-typing
...
Derive pytest.raises from AbstractContextManager
2023-01-18 06:42:46 +01:00
pre-commit-ci[bot]
61cfaacec6
[pre-commit.ci] pre-commit autoupdate ( #10671 )
...
updates:
- [github.com/asottile/blacken-docs: v1.12.1 → 1.13.0](https://github.com/asottile/blacken-docs/compare/v1.12.1...1.13.0 )
- [github.com/pre-commit/pygrep-hooks: v1.9.0 → v1.10.0](https://github.com/pre-commit/pygrep-hooks/compare/v1.9.0...v1.10.0 )
2023-01-17 12:09:19 +02:00
dependabot[bot]
95c62eb527
build(deps): Bump pytest-rerunfailures in /testing/plugins_integration
...
Bumps [pytest-rerunfailures](https://github.com/pytest-dev/pytest-rerunfailures ) from 10.3 to 11.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/10.3...11.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>
2023-01-16 03:00:46 +00:00
Bruno Oliveira
03b19945fb
Merge pull request #10662 from nicoddemus/cherry-pick-release
...
Merge pull request #10659 from pytest-dev/release-7.2.1
2023-01-14 09:35:02 -03:00
Bruno Oliveira
b2ac31cc9f
Merge pull request #10659 from pytest-dev/release-7.2.1
...
Prepare release 7.2.1
(cherry picked from commit 94c05bc2a489a3d6eb5cb47991741f8a61bb4099)
2023-01-14 09:21:43 -03:00
Ilya Konstantinov
1a96f16401
Derive pytest.raises from AbstractContextManager
...
Makes `AbstractContextManager` the shared base class between "raises" and other context managers.
The motivation is for type checkers to narrow `pytest.raises(...) if x else nullcontext()` to a `ContextManager` rather than `object`.
2023-01-13 13:58:49 -05:00
dependabot[bot]
7421f3bb94
build(deps): Bump django in /testing/plugins_integration ( #10643 )
...
Bumps [django](https://github.com/django/django ) from 4.1.3 to 4.1.5.
- [Release notes](https://github.com/django/django/releases )
- [Commits](https://github.com/django/django/compare/4.1.3...4.1.5 )
---
updated-dependencies:
- dependency-name: django
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-13 07:16:43 -03:00
Bruno Oliveira
5e0583f4b9
Fix regen tox environment ( #10640 )
...
Since tox 4.0, the whitelist_external option has been renamed to allowlist_externals.
Co-authored-by: pytest bot <pytestbot@gmail.com>
2023-01-13 07:15:41 -03:00
s-padmanaban
8efb4bb9c1
Do not update cache from xdist worker ( #10641 )
2023-01-13 07:14:52 -03:00
Kadino
3ad4344656
Mitigate directory creation race condition ( #10607 )
...
Fixes https://github.com/pytest-dev/pytest/issues/10604 which could intermittently display unexpected behavior between checking if the path exists and requesting creation. This was fairly prevalent when pytest was being invoked in parallel by another test runner (CTest) and trying to create the same parent-folder for multiple XMLs. A modest amount of testing did not reproduce other filesystem race conditions.
This notably does not work around an edge case where the parent path of the XML could be created as a file instead of a folder or link. That vanishingly rare case should cause file creation to fail on the next line, with a fairly obvious exception message.
2023-01-06 09:12:24 -03:00
Bruno Oliveira
6bf7f55555
Merge pull request #10632 from danigm/fix-tests
...
Fix tests pygments 2.14.0
2023-01-05 12:59:24 -03:00
Daniel Garcia Moreno
61f70a5a75
Fix tests pygments 2.14.0
...
Fix https://github.com/pytest-dev/pytest/issues/10630
2023-01-04 10:30:28 +01:00
Bruno Oliveira
326ae0cd88
Merge pull request #10609 from yusuke-kadowaki/default_policy_all
...
Change the default `tmp_path_retention_policy` to `all`
2022-12-25 14:09:45 -03:00
Yusuke Kadowaki
10220d3f31
Change the default policy to all
2022-12-25 00:18:38 +09:00
Bruno Oliveira
a98b00cd09
Use a more descriptive job name for update-plugin-list workflow
2022-12-21 14:01:37 -03:00
Bruno Oliveira
215ea7fd03
Fix update-plugin-list workflow due to new 'packaging'
...
The latest 'packaging' release has dropped support for `LegacyVersion`, meaning
that version strings which do not conform to the standard now raise an error.
2022-12-21 14:01:37 -03:00
Pierre Sassoulas
b31db4809b
Avoid truncation when truncating means longer output ( #10446 )
...
Fixes #6267
2022-12-17 10:24:46 -03:00
Bruno Oliveira
f6adebb990
Fix tox 4.0 support and docs
...
Also includes pre-commit autoupdate
2022-12-14 08:57:07 -03:00
Bruno Oliveira
b90e7b84d0
Remove reference to explicit pytest tox support
...
This reference no longer exists in tox 4.0 docs.
2022-12-14 08:38:11 -03:00
Bruno Oliveira
19807ab79a
Pin packaging while building docs
...
Packaging >=22 no longer supports 'latest' versions, which is the version that is assigned when building the docs.
https://github.com/pytest-dev/pytest/pull/10578#issuecomment-1348249045
Also first install pytest, then `docs/en/requirements.txt`:
Installing the requirements last will honor pins of libraries
shared between pytest and the docs build.
2022-12-14 08:38:11 -03:00
Bruno Oliveira
3e52124185
Fix passenv setting for tox.ini
...
In tox 4.0 `passenv` is required to be one per-line, or comma-separated.
2022-12-14 08:35:39 -03:00
pre-commit-ci[bot]
1eca228bd5
[pre-commit.ci] pre-commit autoupdate
...
updates:
- [github.com/psf/black: 22.10.0 → 22.12.0](https://github.com/psf/black/compare/22.10.0...22.12.0 )
- [github.com/asottile/pyupgrade: v3.3.0 → v3.3.1](https://github.com/asottile/pyupgrade/compare/v3.3.0...v3.3.1 )
2022-12-13 01:28:21 +00:00
Bruno Oliveira
cab02e67d7
Merge pull request #10559 from pytest-dev/update-plugin-list/patch-9fbd67dd4
...
[automated] Update plugin list
2022-12-06 11:17:45 -03:00
Bruno Oliveira
64dbc7a0a1
Merge pull request #10560 from pytest-dev/dependabot/github_actions/peter-evans/create-pull-request-4.2.3
...
build(deps): Bump peter-evans/create-pull-request from 3.7.0 to 4.2.3
2022-12-06 11:16:54 -03:00
Bruno Oliveira
60d992677d
Merge pull request #10563 from pytest-dev/pre-commit-ci-update-config
...
[pre-commit.ci] pre-commit autoupdate
2022-12-06 11:06:16 -03:00
pre-commit-ci[bot]
0079decf29
[pre-commit.ci] pre-commit autoupdate
...
updates:
- [github.com/asottile/pyupgrade: v3.2.2 → v3.3.0](https://github.com/asottile/pyupgrade/compare/v3.2.2...v3.3.0 )
2022-12-06 00:36:28 +00:00
dependabot[bot]
3a58fc2d44
build(deps): Bump peter-evans/create-pull-request from 3.7.0 to 4.2.3
...
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request ) from 3.7.0 to 4.2.3.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases )
- [Commits](2455e15969...2b011faafd
)
---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-12-05 03:15:13 +00:00
pytest bot
39b6bb551c
[automated] Update plugin list
2022-12-04 00:20:05 +00:00
Marko Pacak
9fbd67dd4b
Class methods can now be discovered as tests ( #10552 )
...
Fix #10525
2022-12-02 15:53:04 +00:00
Zac Hatfield-Dodds
eca93db05b
Merge pull request #10550 from danschef/use_os_sep
...
Use os.sep instead of os.path.sep.
2022-12-02 00:32:12 -08:00
Daniel Scheffler
fb701b538c
Use os.sep instead of os.path.sep.
...
Signed-off-by: Daniel Scheffler <danschef@gfz-potsdam.de>
2022-12-01 18:16:02 +01:00
Bruno Oliveira
314e623304
Merge pull request #10549 from yusuke-kadowaki/more_doc_update
...
Documentation update for the tmp_path configurations
2022-12-01 12:23:43 -03:00