Open
Description
Pytest is returning an incorrect value for sys.__stdout__.isatty()
on Windows 11 vs Linux / previous versions of Windows.
To reproduce:
- Create a file with the following code
import sys
import os
def test_example():
assert not sys.__stdout__.isatty()
assert not os.isatty(sys.__stdout__.fileno())
- Run pytest from the terminal - tests will pass on Linux / Windows pre-11 and fail on Windows 11.
Output of pip list
Package Version
---------- -------
colorama 0.4.6
iniconfig 2.0.0
packaging 24.0
pip 22.3.1
pluggy 1.5.0
pytest 8.2.1
setuptools 65.5.0
- a detailed description of the bug or problem you are having
- output of
pip list
from the virtual environment you are using - pytest and operating system versions
- minimal example if possible