Title: test_fileio error on AIX
Type: Stage:
Components: Versions: Python 3.2, Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: haypo, pitrou, sable, wiggin15
Priority: normal Keywords: patch

Created on 2011-02-14 17:39 by sable, last changed 2015-09-30 16:43 by haypo. This issue is now closed.

File name Uploaded Description Edit
issue11215.diff wiggin15, 2015-09-29 15:45 review
Messages (4)
msg128564 - (view) Author: Sébastien Sablé (sable) Date: 2011-02-14 17:39
I have the following error when running test_fileio on AIX:

FAIL: testAbles (test.test_fileio.OtherFileTests)
Traceback (most recent call last):
  File "/san_cis/home/cis/.buildbot/python-aix6/3.x.phenix.xlc/build/Lib/test/", line 269, in testAbles
    self.assertEqual(f.seekable(), False)
AssertionError: True != False

Ran 34 tests in 0.032s

FAILED (failures=1)

I haven't investigated yet.
msg128566 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-02-14 17:42
This looks vaguely similar to, although the latter has been fixed.
msg251865 - (view) Author: Arnon Yaari (wiggin15) * Date: 2015-09-29 15:45
Some AIX systems have seekable /dev/tty, as is the case here and in msg90762, and on my system too.
There is already an exemption in for systems that have a seekable /dev/tty. AIX just needs to be exempt too. (from my experience, AIX and Solaris behave similarly in many cases, so it makes sense to add aix next to sunos).
I'm submitting a patch to fix this test case on AIX.
msg251953 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2015-09-30 16:43
I see that the test pass on AIX, on Python 2.7 and Python 3.6 buildbots, so I close the issue.

This issue was opened 4 years ago. The test is now skipped on many platforms:

            if sys.platform != "win32":
                    f = self.FileIO("/dev/tty", "a")
                except OSError:
                    # When run in a cron job there just aren't any
                    # ttys, so skip the test.  This also handles other
                    # OS'es that don't support /dev/tty.
                    self.assertEqual(f.readable(), False)
                    self.assertEqual(f.writable(), True)
                    if sys.platform != "darwin" and \
                       'bsd' not in sys.platform and \
                       not sys.platform.startswith('sunos'):
                        # Somehow /dev/tty appears seekable on some BSDs
                        self.assertEqual(f.seekable(), False)
                    self.assertEqual(f.isatty(), True)

(I'm not 100% sure that the line was this f.seekable() check.)
Date User Action Args
2015-09-30 16:43:46hayposetstatus: open -> closed
resolution: fixed
2015-09-30 16:43:40hayposetnosy: + haypo
messages: + msg251953
2015-09-29 15:45:39wiggin15setfiles: + issue11215.diff

nosy: + wiggin15
messages: + msg251865

keywords: + patch
2013-02-19 12:59:17alefsetversions: + Python 2.7
2011-02-14 17:42:51pitrousetnosy: + pitrou
messages: + msg128566
2011-02-14 17:39:08sablecreate