mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-28 13:36:14 +02:00
Fix bug that prevented --format pretty and --format short from working (#1177)
This commit is contained in:
parent
b9a6d029e2
commit
a3f4f6b944
7 changed files with 79 additions and 2 deletions
17
tests/test_color.py
Normal file
17
tests/test_color.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
import pytest
|
||||
|
||||
from jrnl.color import colorize
|
||||
from colorama import Fore, Style
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def data_fixture():
|
||||
string = "Zwei peanuts walked into a bar"
|
||||
yield string
|
||||
|
||||
|
||||
def test_colorize(data_fixture):
|
||||
string = data_fixture
|
||||
colorized_string = colorize(string, "BLUE", True)
|
||||
|
||||
assert colorized_string == Style.BRIGHT + Fore.BLUE + string + Style.RESET_ALL
|
Loading…
Add table
Add a link
Reference in a new issue