Syntax highlighting

This commit is contained in:
Anthony Sottile
2020-02-22 16:34:47 -08:00
parent 1d06a77d44
commit 697b012027
29 changed files with 2515 additions and 18 deletions

View File

@@ -0,0 +1,16 @@
import pytest
from babi.color import Color
from babi.color_manager import _color_to_curses
@pytest.mark.parametrize(
('color', 'expected'),
(
(Color(0x00, 0x00, 0x00), (0, 0, 0)),
(Color(0xff, 0xff, 0xff), (1000, 1000, 1000)),
(Color(0x1e, 0x77, 0xd3), (117, 466, 827)),
),
)
def test_color_to_curses(color, expected):
assert _color_to_curses(color) == expected