Skip to content

Commit

Permalink
Added simple test
Browse files Browse the repository at this point in the history
  • Loading branch information
TimeTravelPenguin authored and TimeTravelPenguin committed Jan 4, 2024
1 parent d3c75af commit 5cb0707
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/BAET/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from ._console import app_console
from ._logging import create_logger
from ._theme import app_theme

__all__ = ["app_console", "create_logger"]
__all__ = ["app_console", "create_logger", "app_theme"]
5 changes: 5 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from rich.console import Console

from BAET import app_theme

test_console = Console(theme=app_theme)
14 changes: 14 additions & 0 deletions tests/test_progress_style.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from rich.style import Style
from rich.text import Text

from BAET.progress_status import ProgressStatusLiteral
from BAET.progress_style import ProgressStyle


def test_call_applies_style():
waiting_style: dict[ProgressStatusLiteral, str] = {"Running": "blue"}
input_str = "test message"
style = ProgressStyle(waiting_style)
test_style = Style.parse(waiting_style["Running"])

assert style(input_str, status="Running").markup == Text(input_str, style=test_style).markup

0 comments on commit 5cb0707

Please sign in to comment.