Skip to content

Conversation

@junhaoliao
Copy link

@junhaoliao junhaoliao commented Dec 2, 2025

closes #14023

This change introduces a long-form CLI option --report-chars as an alternative to the existing
short -r option.


Here is a quick checklist that should be present in PRs.

  • Include documentation when adding new features.
  • Include new tests or update existing tests when applicable.
  • Allow maintainers to push and squash when merging my commits. Please uncheck this if you prefer to squash the commits yourself.

If this change fixes an issue, please:

  • Add text like closes #XYZW to the PR description and/or commits (where XYZW is the issue number). See the github docs for more information.

Unless your change is trivial or a small documentation fix (e.g., a typo or reword of a small section) please:

  • Create a new changelog file in the changelog folder, with a name like <ISSUE NUMBER>.<TYPE>.rst. See changelog/README.rst for details.

    Write sentences in the past or present tense, examples:

    • Improved verbose diff output with sequences.
    • Terminal summary statistics now use multiple colors.

    Also make sure to end the sentence with a ..

  • Add yourself to AUTHORS in alphabetical order.

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Dec 2, 2025
@junhaoliao junhaoliao marked this pull request as ready for review December 2, 2025 07:15
Comment on lines 100 to 106
def test_report_chars_long_option(
self, pytester: Pytester, tmp_path: Path, monkeypatch: MonkeyPatch
) -> None:
"""Test that --report-chars is parsed correctly."""
monkeypatch.setenv("PYTEST_ADDOPTS", "--report-chars=fE")
config = pytester.parseconfig(tmp_path)
assert config.option.reportchars == "fE"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's no suitable test for -r that can be parametrized? If not we could at least parametrize this one to test both the short and long version

@junhaoliao junhaoliao requested a review from jakkdl December 2, 2025 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided (automation) changelog entry is part of PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a long form "--report-chars" to pytest.

2 participants