diff --git a/src/BAET/__init__.py b/src/BAET/__init__.py index ad2f93f..4220a00 100644 --- a/src/BAET/__init__.py +++ b/src/BAET/__init__.py @@ -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"] diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..758c60d --- /dev/null +++ b/tests/__init__.py @@ -0,0 +1,5 @@ +from rich.console import Console + +from BAET import app_theme + +test_console = Console(theme=app_theme) diff --git a/tests/test_progress_style.py b/tests/test_progress_style.py new file mode 100644 index 0000000..eab6f0a --- /dev/null +++ b/tests/test_progress_style.py @@ -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