jrnl/tests/unit/test_color.py
Jonathan Wren 4aabb73847 Implement datetime handling in pytest-bdd
- This was awful and convoluted

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
2021-07-03 15:49:18 -07:00

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