Files
tarot/tests/test_ui.py

26 lines
682 B
Python
Raw Normal View History

2025-12-05 03:41:16 -08:00
from pathlib import Path
2026-02-11 00:02:35 -08:00
import pytest
2025-12-05 03:41:16 -08:00
from tarot.ui import CardDisplay
2026-02-11 00:02:35 -08:00
2025-12-05 03:41:16 -08:00
def test_card_display_init():
display = CardDisplay("default")
assert display.deck_name == "default"
# Check if path resolves correctly relative to src/tarot/ui.py
# src/tarot/ui.py -> src/tarot -> src/tarot/deck/default
expected_suffix = os.path.join("src", "tarot", "deck", "default")
2026-02-11 00:02:35 -08:00
assert str(display.deck_path).endswith(expected_suffix) or str(display.deck_path).endswith(
"default"
)
2025-12-05 03:41:16 -08:00
def test_card_display_resolve_path():
display = CardDisplay("thoth")
assert display.deck_name == "thoth"
assert str(display.deck_path).endswith("thoth")
2026-02-11 00:02:35 -08:00
2025-12-05 03:41:16 -08:00
import os