-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
os.getlogin() fails in tests #1156
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
Comments
From the Python docs:
This doesn't work with pytest because of its stdout capturing - it'll probably work when passing |
Ok, well it's not problem to work around this, it just struck me with surprise. I wonder what's going on there under the hood. If |
And that's basically what pytest does - it replaces stdin by something which is not a terminal. I'm guessing glibc keeps this bug either because it's hard to fix, or for backwards-compatibility. You should probably avoid using I guess this can be closed? |
Its a glibc bug, we aren't at fault |
Running this as a test script fails with:
Outside the test environment, within the same shell, this runs without error. Is this intended behaviour?
The text was updated successfully, but these errors were encountered: