-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
TimeTravelPenguin
authored and
TimeTravelPenguin
committed
Jan 4, 2024
1 parent
d3c75af
commit 5cb0707
Showing
3 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |