Skip to content

Commit 9168203

Browse files
eoan-erminepfmoore
andcommitted
Clarify intention of zipapp.create_archive test
Co-authored-by: Paul Moore <p.f.moore@gmail.com>
1 parent 212ae2f commit 9168203

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Lib/test/test_zipapp.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,10 @@ def test_copied_archive_with_pathlike_target_is_executable(self):
376376
(source / '__main__.py').touch()
377377
target = self.tmpdir / 'source.pyz'
378378
zipapp.create_archive(source, target, interpreter='python')
379+
# Copying an archive uses a different code path than creating
380+
# one from scratch. Ensure that the executable bit is set
381+
# even if the target is a path-like object.
382+
# See https://github.com/python/cpython/issues/156568
379383
new_target = self.tmpdir / 'changed.pyz'
380384
zipapp.create_archive(target, new_target, interpreter='python')
381385
self.assertTrue(new_target.stat().st_mode & stat.S_IEXEC)

0 commit comments

Comments
 (0)