File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -255,10 +255,15 @@ def test_access_parameter(self):
255255 # Try writing with PROT_EXEC and without PROT_WRITE
256256 prot = mmap .PROT_READ | getattr (mmap , 'PROT_EXEC' , 0 )
257257 with open (TESTFN , "r+b" ) as f :
258- m = mmap .mmap (f .fileno (), mapsize , prot = prot )
259- self .assertRaises (TypeError , m .write , b"abcdef" )
260- self .assertRaises (TypeError , m .write_byte , 0 )
261- m .close ()
258+ try :
259+ m = mmap .mmap (f .fileno (), mapsize , prot = prot )
260+ except PermissionError :
261+ # on macOS 14, PROT_READ | PROT_WRITE is not allowed
262+ pass
263+ else :
264+ self .assertRaises (TypeError , m .write , b"abcdef" )
265+ self .assertRaises (TypeError , m .write_byte , 0 )
266+ m .close ()
262267
263268 def test_bad_file_desc (self ):
264269 # Try opening a bad file descriptor...
You can’t perform that action at this time.
0 commit comments