gh-149879: Fix test_httpservers on Cygwin (#150417)

This commit is contained in:
Victor Stinner 2026-05-25 21:50:35 +02:00 committed by GitHub
parent 3cf6ef445f
commit 71fa31454e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -824,7 +824,7 @@ def test_get(self):
# chmod() doesn't work as expected on Windows, and filesystem
# permissions are ignored by root on Unix.
if os.name == 'posix' and os.geteuid() != 0:
if os.name == 'posix' and os.geteuid() != 0 and sys.platform != 'cygwin':
os.chmod(self.tempdir, 0)
try:
response = self.request(self.base_url + '/')