summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-09-19 10:59:48 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2015-09-19 10:59:48 +0300
commitf2d7ea1af124aa80df7ec3071a62442294f9196c (patch)
tree489fba41fe00eef417dbd39a4d175979b4886888
parentaa00324f731c877bcda7cb6cb7243a437a33ef34 (diff)
parentd86a6ef41c7ef746ca871c2c1a74999327d73a7d (diff)
downloadcpython-git-f2d7ea1af124aa80df7ec3071a62442294f9196c.tar.gz
Issue #25101: Try to create a file to test write access in test_zipfile.
-rw-r--r--Lib/test/test_zipfile.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py
index 67e85704aa..2c10821a0c 100644
--- a/Lib/test/test_zipfile.py
+++ b/Lib/test/test_zipfile.py
@@ -684,6 +684,13 @@ class PyZipFileTests(unittest.TestCase):
if not os.access(path, os.W_OK,
effective_ids=os.access in os.supports_effective_ids):
self.skipTest('requires write access to the installed location')
+ filename = os.path.join(path, 'test_zipfile.try')
+ try:
+ fd = os.open(filename, os.O_WRONLY | os.O_CREAT)
+ os.close(fd)
+ except Exception:
+ self.skipTest('requires write access to the installed location')
+ unlink(filename)
def test_write_pyfile(self):
self.requiresWriteAccess(os.path.dirname(__file__))