Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys.__stdout__.isatty() returns incorrect value for Windows 11 #12349

Open
4 tasks done
jdgsmallwood opened this issue May 21, 2024 · 0 comments
Open
4 tasks done

sys.__stdout__.isatty() returns incorrect value for Windows 11 #12349

jdgsmallwood opened this issue May 21, 2024 · 0 comments
Labels
platform: windows windows platform-specific problem plugin: capture related to the capture builtin plugin type: bug problem that needs to be addressed

Comments

@jdgsmallwood
Copy link

jdgsmallwood commented May 21, 2024

Pytest is returning an incorrect value for sys.__stdout__.isatty() on Windows 11 vs Linux / previous versions of Windows.

To reproduce:

  1. 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())
  1. 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
@Zac-HD Zac-HD added type: bug problem that needs to be addressed platform: windows windows platform-specific problem plugin: capture related to the capture builtin plugin labels May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: windows windows platform-specific problem plugin: capture related to the capture builtin plugin type: bug problem that needs to be addressed
Projects
None yet
Development

No branches or pull requests

2 participants