burme-coder-max / tests /test_thanking.py
amkyawdev's picture
Upload folder using huggingface_hub
a7d7463 verified
"""Tests for thanking module"""
import pytest
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent.parent / "src"))
from ui.thanking import (
ThankYou,
Appreciation,
CreditDisplay,
quick_thank,
show_custom_appreciation,
)
class TestThankYou:
"""Test ThankYou class"""
def test_show_method_exists(self):
assert hasattr(ThankYou, "show")
def test_show_animation_method_exists(self):
assert hasattr(ThankYou, "show_animation")
def test_thank_messages_not_empty(self):
assert len(ThankYou.THANK_MESSAGES) > 0
class TestAppreciation:
"""Test Appreciation class"""
def test_show_method_exists(self):
assert hasattr(Appreciation, "show")
def test_show_banner_method_exists(self):
assert hasattr(Appreciation, "show_banner")
def test_appreciation_messages_not_empty(self):
assert len(Appreciation.APPRECIATION_MESSAGES) > 0
class TestCreditDisplay:
"""Test CreditDisplay class"""
def test_show_method_exists(self):
assert hasattr(CreditDisplay, "show")
def test_show_simple_method_exists(self):
assert hasattr(CreditDisplay, "show_simple")
def test_credits_structure(self):
assert "core_developer" in CreditDisplay.CREDITS
assert "technologies" in CreditDisplay.CREDITS
def test_core_developer_info(self):
core = CreditDisplay.CREDITS["core_developer"]
assert "name" in core
assert "role" in core
class TestThankingFunctions:
"""Test additional thanking functions"""
def test_quick_thank_exists(self):
assert callable(quick_thank)
def test_show_custom_appreciation_exists(self):
assert callable(show_custom_appreciation)
if __name__ == "__main__":
pytest.main([__file__, "-v"])