()
| 113 | |
| 114 | |
| 115 | def test_perm_preserving_zipfile_extract(): |
| 116 | # type: () -> None |
| 117 | with zip_fixture() as (zip_file, extract_dir): |
| 118 | with contextlib.closing(ZipFileEx(zip_file)) as zf: |
| 119 | zf.extract("no-x", path=extract_dir) |
| 120 | zf.extract("no-w", path=extract_dir) |
| 121 | zf.extract("with-x", path=extract_dir) |
| 122 | |
| 123 | no_x = os.path.join(extract_dir, "no-x") |
| 124 | no_w = os.path.join(extract_dir, "no-w") |
| 125 | with_x = os.path.join(extract_dir, "with-x") |
| 126 | |
| 127 | assert not is_executable(no_x) |
| 128 | assert not is_executable(no_w) |
| 129 | assert is_executable(with_x) |
| 130 | |
| 131 | files = [no_x, no_w, with_x] |
| 132 | assert all(is_writeable(f) for f in files) |
| 133 | |
| 134 | |
| 135 | def assert_chroot_perms(copyfn): |
nothing calls this directly
no test coverage detected