[pypy-commit] pypy default: Skip this test on 32-bit Posix platforms, with an explanation of why.
arigo
noreply at buildbot.pypy.org
Fri May 11 10:01:28 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r55028:b47f464aaeb5
Date: 2012-05-11 10:01 +0200
http://bitbucket.org/pypy/pypy/changeset/b47f464aaeb5/
Log: Skip this test on 32-bit Posix platforms, with an explanation of
why. We can test it instead in the C backend.
diff --git a/pypy/rpython/module/test/test_ll_os.py b/pypy/rpython/module/test/test_ll_os.py
--- a/pypy/rpython/module/test/test_ll_os.py
+++ b/pypy/rpython/module/test/test_ll_os.py
@@ -214,6 +214,11 @@
raises(OSError, f, fd)
def test_os_lseek():
+ if sys.maxint == 2**31-1 and not sys.platform.startswith('win'):
+ # cannot reliably test lseek() in this mode, because the lseek()
+ # that we get is the one that returns only a 32-bit integer
+ py.test.skip("cannot test lseek on 32-bit here")
+ #
fname = str(udir.join('os_test.txt'))
fd = os.open(fname, os.O_RDWR|os.O_CREAT, 0777)
assert fd >= 0
diff --git a/pypy/translator/c/test/test_extfunc.py b/pypy/translator/c/test/test_extfunc.py
--- a/pypy/translator/c/test/test_extfunc.py
+++ b/pypy/translator/c/test/test_extfunc.py
@@ -134,6 +134,13 @@
res = os.lseek(fd, -r5200000000, 2)
assert res == r4800000000
os.close(fd)
+ try:
+ os.lseek(fd, 0, 0)
+ except OSError:
+ pass
+ else:
+ print "DID NOT RAISE"
+ raise AssertionError
st = os.stat(filename)
assert st.st_size == r10000000000
does_stuff()
More information about the pypy-commit
mailing list