/
niceSOFT
/
python3-wheel
Обзор
Документация
Войти
/
niceSOFT
/
python3-wheel
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
0.45.0
tests/cli/test_unpack.py
36 строк
1 KB
pre-commit-ci[bot]
[pre-commit.ci] pre-commit autoupdate (#635)
11 окт 2024, 23:33
Не верифицирован
11 окт 2024, 23:33
d841597
Код
Авторство
О чём код?
from __future__ import annotations import platform import stat import pytest from wheel.cli.unpack import unpack from wheel.wheelfile import WheelFile def test_unpack(wheel_paths, tmp_path): """ Make sure 'wheel unpack' works. This also verifies the integrity of our testing wheel files. """ for wheel_path in wheel_paths: unpack(wheel_path, str(tmp_path)) @pytest.mark.skipif( platform.system() == "Windows", reason="Windows does not support the executable bit" ) def test_unpack_executable_bit(tmp_path): wheel_path = tmp_path / "test-1.0-py3-none-any.whl" script_path = tmp_path / "script" script_path.write_bytes(b"test script") script_path.chmod(0o755) with WheelFile(wheel_path, "w") as wf: wf.write(str(script_path), "nested/script") script_path.unlink() script_path = tmp_path / "test-1.0" / "nested" / "script" unpack(str(wheel_path), str(tmp_path)) assert not script_path.is_dir() assert stat.S_IMODE(script_path.stat().st_mode) == 0o755