From 4ce2572ce914590f944aab64eb653ecf49ca1dfc Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Thu, 19 Nov 2020 09:39:34 -0500 Subject: [PATCH] Does Windows behave if we restrict ourselves to *just* S_IREAD? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From CPython docs: > Note Although Windows supports chmod(), you can only set the file’s > read-only flag with it (via the stat.S_IWRITE and stat.S_IREAD constants or > a corresponding integer value). All other bits are ignored. --- src/allmydata/test/web/test_webish.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/allmydata/test/web/test_webish.py b/src/allmydata/test/web/test_webish.py index 90eec40ad..a510f26f2 100644 --- a/src/allmydata/test/web/test_webish.py +++ b/src/allmydata/test/web/test_webish.py @@ -244,7 +244,7 @@ class TahoeLAFSSiteTests(SyncTestCase): # Another approach is to make the temp directory unwriteable and # observe the failure when an attempt is made to create a file there. # This is hardly a lovely solution but at least it's kind of simple. - tempdir.chmod(0o550) + tempdir.chmod(0o400) with self.assertRaises(OSError) as ctx: request.gotLength(request_body_size) raise Exception(