/
niceSOFT
/
python3-hatchling
Обзор
Документация
Войти
/
niceSOFT
/
python3-hatchling
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tests/cli/config/test_show.py
110 строк
3 KB
Dimitri Papadopoulos Orfanos
Upgrade Ruff to 0.13.2 (#1890)
28 сен 2025, 21:20
Не верифицирован
28 сен 2025, 21:20
aff6f39
Код
Авторство
О чём код?
def test_default_scrubbed(hatch, config_file, helpers, default_cache_dir, default_data_dir): config_file.model.project = "foo" config_file.model.publish["index"]["auth"] = "bar" config_file.save() result = hatch("config", "show") default_cache_directory = str(default_cache_dir).replace("\\", "\\\\") default_data_directory = str(default_data_dir).replace("\\", "\\\\") assert result.exit_code == 0, result.output assert result.output == helpers.dedent( f""" mode = "local" project = "foo" shell = "" [dirs] project = [] python = "isolated" data = "{default_data_directory}" cache = "{default_cache_directory}" [dirs.env] [projects] [template] name = "Foo Bar" email = "foo@bar.baz" [template.licenses] headers = true default = [ "MIT", ] [template.plugins.default] tests = true ci = false src-layout = true [terminal.styles] info = "bold" success = "bold cyan" error = "bold red" warning = "bold yellow" waiting = "bold magenta" debug = "bold" spinner = "simpleDotsScrolling" """ ) def test_reveal(hatch, config_file, helpers, default_cache_dir, default_data_dir): config_file.model.project = "foo" config_file.model.publish["index"]["auth"] = "bar" config_file.save() result = hatch("config", "show", "-a") default_cache_directory = str(default_cache_dir).replace("\\", "\\\\") default_data_directory = str(default_data_dir).replace("\\", "\\\\") assert result.exit_code == 0, result.output assert result.output == helpers.dedent( f""" mode = "local" project = "foo" shell = "" [dirs] project = [] python = "isolated" data = "{default_data_directory}" cache = "{default_cache_directory}" [dirs.env] [projects] [publish.index] repo = "main" auth = "bar" [template] name = "Foo Bar" email = "foo@bar.baz" [template.licenses] headers = true default = [ "MIT", ] [template.plugins.default] tests = true ci = false src-layout = true [terminal.styles] info = "bold" success = "bold cyan" error = "bold red" warning = "bold yellow" waiting = "bold magenta" debug = "bold" spinner = "simpleDotsScrolling" """ )