diff --git a/Lib/test/test_fcntl.py b/Lib/test/test_fcntl.py index 837fc16569a..8e550820714 100644 --- a/Lib/test/test_fcntl.py +++ b/Lib/test/test_fcntl.py @@ -116,7 +116,8 @@ def test_fcntl_64_bit(self): os.close(fd) def test_flock(self): - self.f = open(TESTFN, 'wb') + # Solaris needs readable file for shared lock + self.f = open(TESTFN, 'wb+') fileno = self.f.fileno() fcntl.flock(fileno, fcntl.LOCK_SH) fcntl.flock(fileno, fcntl.LOCK_UN)