19 lines
663 B
Python
19 lines
663 B
Python
import pytest
|
|
from pathlib import Path
|
|
from tarot.ui import CardDisplay
|
|
|
|
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")
|
|
assert str(display.deck_path).endswith(expected_suffix) or str(display.deck_path).endswith("default")
|
|
|
|
def test_card_display_resolve_path():
|
|
display = CardDisplay("thoth")
|
|
assert display.deck_name == "thoth"
|
|
assert str(display.deck_path).endswith("thoth")
|
|
|
|
import os
|