Skip test_readonly_save on Cygwin.

The test seems to require opening a file for reading, mmapping it,
then opening that file for writing.  Windows doesn't allow this.
This commit is contained in:
DWesl 2021-11-04 19:48:53 -04:00
parent 29b92391bc
commit 5a41417224

View File

@ -193,6 +193,10 @@ class TestImage:
assert not im.readonly
@pytest.mark.skipif(is_win32(), reason="Test requires opening tempfile twice")
@pytest.mark.skipif(
sys.platform == "cygwin",
reason="Test requires opening an mmaped file for writing",
)
def test_readonly_save(self, tmp_path):
temp_file = str(tmp_path / "temp.bmp")
shutil.copy("Tests/images/rgb32bf-rgba.bmp", temp_file)