Commit Graph

15718 Commits

Author SHA1 Message Date
Fabian Sturm 13eacdad8a
Add summary for xfails with -rxX option (#11574)
Co-authored-by: Brian Okken <1568356+okken@users.noreply.github.com>
2024-01-05 09:59:19 -03:00
Ran Benita a616adf3ae unittest: inline `_make_xunit_fixture`
The indirection makes things harder to follow in this case IMO.
2024-01-05 14:37:03 +02:00
Ran Benita 685e52ec30 nodes: fix attribute name `fspath` -> `path` in `get_fslocation_from_item` 2024-01-04 22:32:34 +02:00
Ran Benita 7b4ab8134e fixtures: remove unnecessary `fspath` workaround 2024-01-04 22:32:34 +02:00
Ran Benita c2a4a8d518
Merge pull request #11769 from neutrinoceros/fix_warns_docstring
Fix a mistake in pytest.warns' docstring (expect_warning accepts tuples, not any sequence)
2024-01-04 14:27:49 +02:00
Clément Robert ac96256272 Fix a mistake in pytest.warns' docstring (expect_warning accepts tuples, not any sequence) 2024-01-04 11:51:12 +01:00
Bruno Oliveira d38193646d
Update docstring of scripts/generate-gh-release-notes.py (#11767)
Follow up to #11754.
2024-01-04 07:29:20 -03:00
Bruno Oliveira cd07177906
Merge pull request #11754 from nicoddemus/release-notes
Improve GitHub release workflow
2024-01-03 20:14:48 -03:00
Bruno Oliveira 6321b74fae Enable type-checking in scripts/ 2024-01-03 19:47:56 -03:00
Bruno Oliveira 5aa289e478 Improve GitHub release workflow
This changes the existing script to just generate the release notes and delegate the actual publishing to the `softprops/action-gh-release@v1` action.

This allows us to delete the custom code, which failed recently in https://github.com/pytest-dev/pytest/actions/runs/7370258570/job/20056477756.
2024-01-03 19:47:56 -03:00
Ben Brown 12b9bd5801
Fix teardown error reporting when `--maxfail=1` (#11721)
Co-authored-by: Ran Benita <ran@unusedvar.com>
2024-01-03 19:39:24 +02:00
Ran Benita f017df443a
Merge pull request #11757 from bluetech/rm-removed-in-8
Remove pytest 8 deprecations
2024-01-03 16:53:10 +02:00
Ran Benita 1ba07450e4 doc/deprecations: fix incorrect title level 2024-01-03 14:29:45 +02:00
Ran Benita 215f4d1fab Remove `PytestRemovedIn8Warning`
Per our deprecation policy.
2024-01-03 14:29:45 +02:00
Ran Benita 6c89f9261c Remove deprecated py.path (`fspath`) node constructor arguments 2024-01-03 14:29:45 +02:00
Ran Benita a98f02d423 Remove deprecated py.path hook arguments 2024-01-03 14:29:42 +02:00
Marc Bresson effc2b0529
Clarified `markers` ini property. Fix #11738 (#11739) 2024-01-03 14:20:54 +02:00
Ran Benita 2c5c97b6d1
Merge pull request #11760 from bluetech/fix-highlight-empty-source
terminalwriter: fix crash trying to highlight empty source
2024-01-03 09:38:29 +02:00
Ran Benita cb5a42c836 terminalwriter: fix crash trying to highlight empty source
For quick checking I don't know how we can reach here with an empty
source, so test just checks the function directly.

Fix #11758.
2024-01-02 19:37:24 +02:00
Ran Benita 0f18a7fe5e Remove deprecated nose support 2024-01-02 12:20:47 +02:00
Ran Benita 0591569b4b Remove deprecated pytest.{exit,fail,skip}(msg=...) argument 2024-01-02 12:20:47 +02:00
Ran Benita 477959ef7d Remove deprecated `pytest.Instance` backward compat 2024-01-02 12:20:47 +02:00
Ran Benita 4147c92b21 Remove deprecated `pytest.warns(None)` 2024-01-02 12:20:47 +02:00
Ran Benita 10fbb2325f Remove deprecated `Parser.addoption` backward compatibilities 2024-01-02 12:20:47 +02:00
Ran Benita 1f8b39ed32 Remove deprecated `--strict` option 2024-01-02 12:20:47 +02:00
Ran Benita f4e7b0d6e0 Remove deprecated `pytest_cmdline_preparse` hook 2024-01-02 12:20:47 +02:00
Ran Benita f13724e2e3 Remove deprecated {FSCollector,Package}.{gethookproxy,isinitpath} 2024-01-02 12:20:47 +02:00
Ran Benita a53984a55b
Merge pull request #11756 from pytest-dev/cherry-pick-release
Cherry pick 8.0.0rc1 release notes
2024-01-02 11:20:03 +02:00
Ran Benita d3c7ba310c Merge pull request #11744 from pytest-dev/release-8.0.0rc1
Prepare release 8.0.0rc1

(cherry picked from commit 665e4e58d3fba8319e922674c286e92f070e6ec3)
2024-01-02 10:59:26 +02:00
Ran Benita 6bec880283
Merge pull request #11753 from bluetech/cherry-pick-release
Cherry-pick 7.4.4 release notes
2023-12-31 14:26:50 +02:00
Ran Benita a1b6b7473b Merge pull request #11752 from pytest-dev/release-7.4.4
Prepare release 7.4.4

(cherry picked from commit 18dcd9d38d18fc01bf1f7f5f60db69f785957101)
2023-12-31 14:15:46 +02:00
Ran Benita 3701d1218b
Merge pull request #11746 from pytest-dev/update-plugin-list/patch-acd445a3f
[automated] Update plugin list
2023-12-31 10:26:34 +02:00
Ran Benita d220880924
nodes: fix tracebacks from collection errors are not getting pruned (#11711)
Fix #11710.
2023-12-31 10:14:23 +02:00
Ran Benita 640f84a5aa
Merge pull request #11745 from bluetech/change-marked-fixture-removal
Change "Marks applied to fixtures" removal from 8 to 9
2023-12-31 10:10:20 +02:00
pytest bot 460c38915d [automated] Update plugin list 2023-12-31 00:20:30 +00:00
Ran Benita a71a95b54c Change "Marks applied to fixtures" removal from 8 to 9
The deprecation has only been added in 8.0, so can't be removed in 8.
That will have to wait for 9.
2023-12-30 22:14:40 +02:00
Ran Benita acd445a3f3
Merge pull request #11646 from bluetech/pkg-collect
Rework Session and Package collection
2023-12-30 12:51:48 +02:00
Ran Benita c7ee55993b
Merge pull request #11736 from pytest-dev/update-plugin-list/patch-52db918a2
[automated] Update plugin list
2023-12-30 12:49:17 +02:00
Ran Benita b9855b244d
Merge pull request #11737 from pytest-dev/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-12-30 12:35:31 +02:00
pre-commit-ci[bot] 1e5aab1b2b
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 23.12.0 → 23.12.1](https://github.com/psf/black/compare/23.12.0...23.12.1)
- [github.com/pre-commit/mirrors-mypy: v1.7.1 → v1.8.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.7.1...v1.8.0)
2023-12-25 20:43:18 +00:00
pytest bot f93c0fc34e [automated] Update plugin list 2023-12-24 00:20:08 +00:00
Michał Górny 52db918a27
Fix handling empty values of NO_COLOR and FORCE_COLOR (#11712)
* Fix handling empty values of NO_COLOR and FORCE_COLOR

Fix handling NO_COLOR and FORCE_COLOR environment variables to correctly
be ignored when they are set to an empty value, as defined
in the specification:

> Command-line software which adds ANSI color to its output by default
> should check for a NO_COLOR environment variable that, when present
> *and not an empty string* (regardless of its value), prevents
> the addition of ANSI color.

(emphasis mine, https://no-color.org/)

The same is true of FORCE_COLOR, https://force-color.org/.

* Streamline testing for FORCE_COLOR and NO_COLOR

Streamline the tests for FORCE_COLOR and NO_COLOR variables, and cover
all possible cases (unset, set to empty, set to "1").  Combine the two
assert functions into one taking boolean parameters.  Mock file.isatty
in all circumstances to ensure that the environment variables take
precedence over the fallback value resulting from isatty check (or that
the fallback is actually used, in the case of both FORCE_COLOR
and NO_COLOR being unset).
2023-12-23 10:12:13 +02:00
Ran Benita 54a0ee02ea
Merge pull request #11732 from bluetech/typing-tweaks
Some minor typing tweaks
2023-12-22 13:00:52 +02:00
Benjamin Schubert 88ae27da08
Add syntactic highlights to the error explanations (#11661)
* Put a 'reset' color in front of the highlighting

When doing the highlighting, some lexers will not set the initial color
explicitly, which may lead to the red from the errors being propagated
to the start of the expression

* Add syntactic highlighting to the error explanations

This updates the various error reporting to highlight python code when
displayed, to increase readability and make it easier to understand
2023-12-21 17:11:56 +00:00
Ran Benita e06a3d02f8
Merge pull request #11715 from pytest-dev/update-plugin-list/patch-047ba83da
[automated] Update plugin list
2023-12-21 17:16:29 +02:00
Ran Benita 75f292d9df Some minor typing tweaks 2023-12-19 23:29:27 +02:00
pre-commit-ci[bot] 581762fcba
[pre-commit.ci] pre-commit autoupdate (#11722)
updates:
- [github.com/psf/black: 23.11.0 → 23.12.0](https://github.com/psf/black/compare/23.11.0...23.12.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-12-18 21:43:27 +00:00
Benjamin Schubert 803b190a17
Merge pull request #11660 from BenjaminSchubert/bschubert/simplify-pprint
Remove more unused pprint features
2023-12-18 09:04:35 +00:00
Benjamin Schubert 283a746dad pprint: Remove conversion to int, we only accept those 2023-12-18 08:35:57 +00:00
Benjamin Schubert 64b5b665cf pprint: Remove the option to add underscore for numbers
This is never used, we can remove this. If we wanted instead, we could
always enable it
2023-12-18 08:35:57 +00:00