Skip to content

python -m test color print with and without -j #129363

Description

@lczyk

Bug report

Bug description:

./python.exe -m test -j4 prints test results in color. ./python.exe -m test does not. I'm assuming that the -j behaviour is the intended one, as that's the basic instruction in the dev guide.

Having looked at the code, looks like Regrtest::run_tests_sequentially is a tiny bit outdated. I'll submit a PR for consideration in a bit (submitting issue to get an issue number).

Here is an asciinema link demonstrating the behaviour.

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    on Jan 27, 2025
  2. added
    type-featureA feature request or enhancement
    and removed
    type-bugAn unexpected behavior, bug, or error
    on Jan 30, 2025
  3. hugovk commented on Jan 30, 2025

    @hugovk
    Member

    ./python.exe -m test -j4 prints test results in color. ./python.exe -m test does not.

    ./python.exe -m test does print test results in colour, but it only prints success results for slow tests, so this is technically a feature. More at #129364 (review).

    Anyway, this only affects 3.14 so the in practice the distinction doesn't affect bugfix backports :)

  4. added 2 commits that reference this issue on Jan 30, 2025
  5. added a commit that references this issue on Feb 21, 2025
  6. added 2 commits that reference this issue on Feb 21, 2025
  7. added 2 commits that reference this issue on Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions