@@ -51,6 +51,7 @@ def posix_module_backend(self):
51
51
import tempfile
52
52
import time
53
53
import unittest
54
+ import sys
54
55
55
56
PREFIX = 'select_graalpython_test'
56
57
TEMP_DIR = tempfile .gettempdir ()
@@ -82,18 +83,22 @@ def python_flock_blocks_sh_flock(python_flock_type, sh_flock_type):
82
83
83
84
class FcntlTests (unittest .TestCase ):
84
85
@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' )
85
87
def test_flock_x_and_x (self ):
86
88
python_flock_blocks_sh_flock (fcntl .LOCK_EX , 'x' )
87
89
88
90
@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' )
89
92
def test_flock_x_and_s (self ):
90
93
python_flock_blocks_sh_flock (fcntl .LOCK_EX , 's' )
91
94
92
95
@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' )
93
97
def test_flock_s_and_x (self ):
94
98
python_flock_blocks_sh_flock (fcntl .LOCK_SH , 'x' )
95
99
96
100
@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' )
97
102
def test_flock_s_and_s (self ):
98
103
os .close (os .open (TEST_FILENAME_FULL_PATH , os .O_WRONLY | os .O_CREAT ))
99
104
file = os .open (TEST_FILENAME_FULL_PATH , os .O_WRONLY )
@@ -104,4 +109,4 @@ def test_flock_s_and_s(self):
104
109
assert p .poll () == 42
105
110
finally :
106
111
fcntl .flock (file , fcntl .LOCK_UN )
107
- os .close (file )
112
+ os .close (file )
0 commit comments