mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-28 13:36:14 +02:00
Implement datetime handling in pytest-bdd
- This was awful and convoluted Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
This commit is contained in:
parent
cda07bf8d9
commit
4aabb73847
16 changed files with 133 additions and 87 deletions
17
tests/unit/test_color.py
Normal file
17
tests/unit/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