summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-09-19 08:00:11 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-09-19 08:00:11 (GMT)
commitd644d5eefa1d18a21cb89b63d488ce8bea1d548c (patch)
treee798c19798f348d787b97a7dca4027959a462a47 /Lib/test
parent0e14e6610b3cf692377996fad569496191a3f731 (diff)
parentf2d7ea1af124aa80df7ec3071a62442294f9196c (diff)
downloadcpython-d644d5eefa1d18a21cb89b63d488ce8bea1d548c.zip
cpython-d644d5eefa1d18a21cb89b63d488ce8bea1d548c.tar.gz
cpython-d644d5eefa1d18a21cb89b63d488ce8bea1d548c.tar.bz2
Issue #25101: Try to create a file to test write access in test_zipfile.
Diffstat (limited to 'Lib/test')
-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 67e8570..2c10821 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__))