@@ -51,6 +51,7 @@ def posix_module_backend(self):
5151import tempfile
5252import time
5353import unittest
54+ import sys
5455
5556PREFIX = 'select_graalpython_test'
5657TEMP_DIR = tempfile .gettempdir ()
@@ -82,18 +83,22 @@ def python_flock_blocks_sh_flock(python_flock_type, sh_flock_type):
8283
8384class FcntlTests (unittest .TestCase ):
8485 @unittest .skipUnless (__graalpython__ .posix_module_backend () != 'java' , 'No support in Truffle API (GR-28740)' )
86+ @unittest .skipUnless (sys .platform != 'darwin' , 'MacOSX does not have flock utility' )
8587 def test_flock_x_and_x (self ):
8688 python_flock_blocks_sh_flock (fcntl .LOCK_EX , 'x' )
8789
8890 @unittest .skipUnless (__graalpython__ .posix_module_backend () != 'java' , 'No support in Truffle API (GR-28740)' )
91+ @unittest .skipUnless (sys .platform != 'darwin' , 'MacOSX does not have flock utility' )
8992 def test_flock_x_and_s (self ):
9093 python_flock_blocks_sh_flock (fcntl .LOCK_EX , 's' )
9194
9295 @unittest .skipUnless (__graalpython__ .posix_module_backend () != 'java' , 'No support in Truffle API (GR-28740)' )
96+ @unittest .skipUnless (sys .platform != 'darwin' , 'MacOSX does not have flock utility' )
9397 def test_flock_s_and_x (self ):
9498 python_flock_blocks_sh_flock (fcntl .LOCK_SH , 'x' )
9599
96100 @unittest .skipUnless (__graalpython__ .posix_module_backend () != 'java' , 'No support in Truffle API (GR-28740)' )
101+ @unittest .skipUnless (sys .platform != 'darwin' , 'MacOSX does not have flock utility' )
97102 def test_flock_s_and_s (self ):
98103 os .close (os .open (TEST_FILENAME_FULL_PATH , os .O_WRONLY | os .O_CREAT ))
99104 file = os .open (TEST_FILENAME_FULL_PATH , os .O_WRONLY )
@@ -104,4 +109,4 @@ def test_flock_s_and_s(self):
104109 assert p .poll () == 42
105110 finally :
106111 fcntl .flock (file , fcntl .LOCK_UN )
107- os .close (file )
112+ os .close (file )
0 commit comments