# HG changeset patch # User Mads Kiilerich # Date 1339711347 -7200 # Node ID 59a99457aa659a0cd79f816d2fb2fb804a0c843b # Parent 55c85631631b3dcd4f96c3cb2ae415b150f6dbbb tests/hghave: test that a fifo actually can be created on the filesystem Some tests were failing on FAT filesystems. [ original upstream message ] diff -r 55c85631631b -r 59a99457aa65 tests/hghave.py --- a/tests/hghave.py Fri Jun 15 00:02:27 2012 +0200 +++ b/tests/hghave.py Fri Jun 15 00:02:27 2012 +0200 @@ -100,7 +100,15 @@ return False def has_fifo(): - return getattr(os, "mkfifo", None) is not None + if getattr(os, "mkfifo", None) is None: + return False + name = tempfile.mktemp(dir='.', prefix=tempprefix) + try: + os.mkfifo(name) + os.unlink(name) + return True + except OSError: + return False def has_cacheable_fs(): from mercurial import util