mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 08:38:32 +02:00
- This was awful and convoluted Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
17 lines
382 B
Python
17 lines
382 B
Python
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
|