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
test_file2k.py depends on sys.stdin being unseekable #67357
Comments
# LD_LIBRARY_PATH=`pwd` ./python Lib/test/regrtest.py test_file2k </dev/null
[1/1] test_file2k
test test_file2k failed -- Traceback (most recent call last):
File "/builddir/build/BUILD/Python-2.7.9/Lib/test/test_file2k.py", line 236, in testStdin
self.assertRaises(IOError, sys.stdin.seek, -1)
AssertionError: IOError not raised 1 test failed: I believe this is similar issue to http://bugs.python.org/issue14853 |
Removing a test when it doesn't pass is not the correct way to fix a test... I would be better to write it differently to support seekable stdin. Or if it doesn't make sense, skip the test if stdin is seeable. |
Whilst I agree, this is not what was done in http://bugs.python.org/issue14853 . There it was concluded that the test itself is bogus and tests essentially nothing. |
New changeset 7f30206d402f by Victor Stinner in branch '2.7': |
Instead of removing the test, I modified it to be skipped if stdin is not a TTY. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: