Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r50512:0eea2bcfa892 Date: 2011-12-14 18:15 +0100 http://bitbucket.org/pypy/pypy/changeset/0eea2bcfa892/
Log: See comments. Thanks tumbleweed diff --git a/pypy/module/posix/test/test_posix2.py b/pypy/module/posix/test/test_posix2.py --- a/pypy/module/posix/test/test_posix2.py +++ b/pypy/module/posix/test/test_posix2.py @@ -656,7 +656,11 @@ os.fsync(f) # <- should also work with a file, or anything finally: # with a fileno() method f.close() - raises(OSError, os.fsync, fd) + try: + # May not raise anything with a buggy libc (or eatmydata) + os.fsync(fd) + except OSError: + pass raises(ValueError, os.fsync, -1) if hasattr(os, 'fdatasync'): @@ -668,7 +672,11 @@ os.fdatasync(fd) finally: f.close() - raises(OSError, os.fdatasync, fd) + try: + # May not raise anything with a buggy libc (or eatmydata) + os.fdatasync(fd) + except OSError: + pass raises(ValueError, os.fdatasync, -1) if hasattr(os, 'fchdir'): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit