/
githubmirror
/
cheat.sh
Обзор
Документация
Войти
/
githubmirror
/
cheat.sh
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
lib/cheat_wrapper_test.py
40 строк
559 B
Igor Chubin
Format python code using black
29 июл 2025, 21:07
29 июл 2025, 21:07
e82797a
Код
Авторство
О чём код?
from cheat_wrapper import _add_section_name unchanged = """ python/:list ls + g++ g/+ clang++ btrfs~volume :intro :cht.sh python/copy+file python/rosetta/:list emacs:go-mode/:list g++g++ """ split = """ python copy file python/copy file python file python/file python+file python/file g++ -O1 g++/-O1 """ def test_header_split(): for inp in unchanged.strip().splitlines(): assert inp == _add_section_name(inp) for test in split.strip().split("\n\n"): inp, outp = test.split("\n") assert outp == _add_section_name(inp)