df
This commit is contained in:
18
tests/test_ui.py
Normal file
18
tests/test_ui.py
Normal file
@@ -0,0 +1,18 @@
|
||||
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
|
||||
Reference in New Issue
Block a user