/
niceSOFT
/
python3-wheel
Обзор
Документация
Войти
/
niceSOFT
/
python3-wheel
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
0.38.0
tests/cli/test_convert.py
28 строк
881 B
Henry Schreiner
Added pyupgrade and flake8-bugbear to pre-commit config (#432)
30 дек 2021, 22:45
Не верифицирован
30 дек 2021, 22:45
ad29512
Код
Авторство
О чём код?
from __future__ import annotations import os.path import re from wheel.cli.convert import convert, egg_info_re from wheel.wheelfile import WHEEL_INFO_RE def test_egg_re(): """Make sure egg_info_re matches.""" egg_names_path = os.path.join(os.path.dirname(__file__), "eggnames.txt") with open(egg_names_path) as egg_names: for line in egg_names: line = line.strip() if line: assert egg_info_re.match(line), line def test_convert_egg(egg_paths, tmpdir): convert(egg_paths, str(tmpdir), verbose=False) wheel_names = [path.basename for path in tmpdir.listdir()] assert len(wheel_names) == len(egg_paths) assert all(WHEEL_INFO_RE.match(filename) for filename in wheel_names) assert all( re.match(r"^[\w\d.]+-\d\.\d-\w+\d+-[\w\d]+-[\w\d]+\.whl$", fname) for fname in wheel_names )