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 OpenBSD 4.4
Type: behavior Stage: patch review
Components: Tests Versions: Python 3.1, Python 2.7, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: henry.precheur, pitrou
Priority: normal Keywords: patch

Created on 2008-09-16 05:21 by henry.precheur, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_fileio_openbsd.diff henry.precheur, 2008-09-16 05:21
Messages (3)
msg73292 - (view) Author: Henry Precheur (henry.precheur) Date: 2008-09-16 05:21
test_fileio
test test_fileio failed -- Traceback (most recent call last):
  File "/home/henry/compile/python2.6/Lib/test/test_fileio.py", line
155, in testAbles
    self.assertEquals(f.seekable(), False)
AssertionError: True != False

Apparently it is expected to "fail" for *BSD systems since darwin,
freebsd and sunos / solaris are not expected to pass this test:

                    if sys.platform != "darwin" and \
                       not sys.platform.startswith('freebsd') and \
                       not sys.platform.startswith('sunos'):
                        # Somehow /dev/tty appears seekable on some BSDs
                        self.assertEquals(f.seekable(), False)

I just added openbsd to the list and the test works. I would also
suggest to add netbsd, since it is very very likely to have the same
behavior.
msg87992 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-05-17 12:07
There are other changed files than just test_fileio.py in your patch, I
suppose they aren't needed for this bug?
Also, it would probably be more future-proof to test for `'bsd' in
sys.platform`.
msg88242 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-05-23 16:35
I've committed a more generic fix to test_fileio. Normally it should be
ok, if there's any problem please reopen the bug.
History
Date User Action Args
2022-04-11 14:56:39adminsetgithub: 48127
2009-05-23 16:35:57pitrousetstatus: open -> closed
resolution: fixed
messages: + msg88242

versions: + Python 3.1, Python 2.7
2009-05-17 12:07:07pitrousetnosy: + pitrou
messages: + msg87992
2009-05-17 02:42:26ajaksu2setpriority: normal
components: + Tests, - Extension Modules
stage: patch review
2008-09-16 05:21:40henry.precheurcreate