This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_fileio fails on AIX
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.7, Python 3.6, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ericvw, martin.panter, python-dev, sarterm
Priority: normal Keywords: patch

Created on 2016-09-08 08:28 by sarterm, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
Python-3.5.1-fileio.patch sarterm, 2016-09-08 08:28 Patch to skip seekable = False assertion for /dev/tty in test_fileio, so the test no more fails on AIX
Messages (4)
msg274985 - (view) Author: Matthieu S (sarterm) * Date: 2016-09-08 08:28
======================================================================
FAIL: testAbles (test.test_fileio.COtherFileTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/freeware/src/packages/BUILD/Python-3.5.2/64bit/Lib/test/test_fileio.py", line 382, in testAbles
    self.assertEqual(f.seekable(), False)
AssertionError: True != False

======================================================================
FAIL: testAbles (test.test_fileio.PyOtherFileTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/freeware/src/packages/BUILD/Python-3.5.2/64bit/Lib/test/test_fileio.py", line 382, in testAbles
    self.assertEqual(f.seekable(), False)
AssertionError: True != False

/dev/tty is seakable on AIX, like on some other Unix on wich this assertion is already skipped (macOS, BSD, SunOS).

The attached patch adds adds AIX to the list of platform on wich the assertion should be skipped.
msg274997 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-09-08 09:51
You should be able to provide a tuple of prefixes (I can easily change to that change when I commit):

not sys.platform.startswith(('sunos', 'aix'))

However I noticed the AIX buildbots are all passing test_fileio. I wonder what the difference is? Maybe the buildbot process doesn’t have a /dev/tty and skips the test.

Would this also be needed on 2.7? The test seems to be called testAblesOnTTY() there.
msg280495 - (view) Author: Matthieu S (sarterm) * Date: 2016-11-10 08:27
Sorry for the late reply.

I did some additional testing, and I can confirm that this assertion should also be skipped in Python 2.7 on AIX.

And the test does not fail when run without a tty, so we can assume that this is what happens on the builbots.
msg280731 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-11-14 05:39
New changeset a2ba15f05ed1 by Martin Panter in branch '3.5':
Issue #28016: Skip /dev/tty seekable() test on AIX
https://hg.python.org/cpython/rev/a2ba15f05ed1

New changeset b1f99e09bd77 by Martin Panter in branch '2.7':
Issue #28016: Skip /dev/tty seekable() test on AIX
https://hg.python.org/cpython/rev/b1f99e09bd77
History
Date User Action Args
2022-04-11 14:58:36adminsetgithub: 72203
2016-11-14 07:12:27martin.pantersetstatus: open -> closed
stage: patch review -> resolved
resolution: fixed
versions: + Python 2.7, Python 3.7
2016-11-14 05:39:13python-devsetnosy: + python-dev
messages: + msg280731
2016-11-10 08:27:48sartermsetmessages: + msg280495
2016-09-08 15:41:53ericvwsetnosy: + ericvw
2016-09-08 09:51:24martin.pantersetversions: + Python 3.6
nosy: + martin.panter

messages: + msg274997

stage: patch review
2016-09-08 08:28:48sartermcreate