Skip to content

No tty / color support on Windows #2819

@schlamar

Description

@schlamar

Issue

Color output in Windows from tools does not work as expected.

Expected output:

image

Actual output within tox:

image

This should have been fixed by @masenf in #2711 So maybe there was a regression since then.

Environment

Provide at least:

  • OS: Windows
  • pip list of the host Python where tox is installed:
Package       Version
------------- -------
cachetools    5.2.0
chardet       5.1.0
colorama      0.4.6
distlib       0.3.6
filelock      3.9.0
packaging     22.0
pip           22.3.1
platformdirs  2.6.2
pluggy        1.0.0
pyproject_api 1.4.0
setuptools    65.6.3
tomli         2.0.1
tox           4.2.1
virtualenv    20.17.1
wheel         0.38.4

Minimal example

If possible, provide a minimal reproducer for the issue:

[testenv]
deps = pytest
commands =
    python -c 'import sys; print("sys.stdout.isatty(): %s" % sys.stdout.isatty()); print("to stdout, should be colorless\n"); print("sys.stderr.isatty(): %s" % sys.stderr.isatty());        print("to stderr, should be red?\n", file=sys.stderr)'
    pytest {posargs}

test_test.py

def test():
    assert False

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:documentationhelp:wantedIssues that have been acknowledged, a solution determined and a PR might likely be accepted.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions