/
niceSOFT
/
python3-pytest
Обзор
Документация
Войти
/
niceSOFT
/
python3-pytest
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
doc/en/example/assertion/test_failures.py
16 строк
464 B
Ronny Pfannschmidt
RFC: from __future__ import annotations + migrate
20 июн 2024, 12:03
20 июн 2024, 12:03
9295f9f
Код
Авторство
О чём код?
from __future__ import annotations import os.path import shutil failure_demo = os.path.join(os.path.dirname(__file__), "failure_demo.py") pytest_plugins = ("pytester",) def test_failure_demo_fails_properly(pytester): target = pytester.path.joinpath(os.path.basename(failure_demo)) shutil.copy(failure_demo, target) result = pytester.runpytest(target, syspathinsert=True) result.stdout.fnmatch_lines(["*44 failed*"]) assert result.ret != 0