Does Windows behave if we restrict ourselves to *just* S_IREAD?

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.
This commit is contained in:
Jean-Paul Calderone 2020-11-19 09:39:34 -05:00
parent ff8906ecb2
commit 4ce2572ce9

View File

@ -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(