Commits

Armin Rigo committed b47f464

Skip this test on 32-bit Posix platforms, with an explanation of why.
We can test it instead in the C backend.

Comments (0)

Files changed (2)

pypy/rpython/module/test/test_ll_os.py

     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

pypy/translator/c/test/test_extfunc.py

         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()