- Replaced deprecated console usage in `print_access_card` with a new console import for improved output handling. - Updated test assertions in `test_pools.py` and `test_prompts.py` for better clarity and accuracy in expected results.
29 lines
762 B
Python
29 lines
762 B
Python
from gpu_rent.term import paint
|
|
|
|
|
|
def test_paint_warn_bang():
|
|
out = paint("! диск data тарифицируется 24/7")
|
|
assert "[yellow]" in out
|
|
|
|
|
|
def test_paint_error():
|
|
out = paint("idle-killer fail: timeout")
|
|
assert "[red]" in out
|
|
|
|
|
|
def test_paint_ok():
|
|
out = paint("doctor ok (16 проверок)")
|
|
assert "[green]" in out
|
|
|
|
|
|
def test_paint_passthrough_markup():
|
|
raw = "[green]рекомендация:[/green] ru-6"
|
|
assert paint(raw) == raw
|
|
|
|
|
|
def test_paint_passthrough_only_our_markup():
|
|
raw = "[yellow]! риск[/yellow]"
|
|
assert paint(raw) == raw
|
|
# Letter-tags look like Rich markup → left for caller who built them.
|
|
assert "[bold]" in paint("note [bold]x[/bold] end")
|