Use a faster implementation of the Color type

Now implemented in C
This commit is contained in:
Kovid Goyal
2021-10-28 11:15:13 +05:30
parent 40c046f86b
commit 2443dc135c
21 changed files with 395 additions and 132 deletions

View File

@@ -5,6 +5,7 @@
from . import BaseTest
from kitty.utils import log_error
from kitty.options.utils import DELETE_ENV_VAR
from kitty.fast_data_types import Color
class TestConfParsing(BaseTest):
@@ -37,7 +38,7 @@ class TestConfParsing(BaseTest):
opts = p('font_size 11.37', 'clear_all_shortcuts y', 'color23 red')
self.ae(opts.font_size, 11.37)
self.ae(opts.mouse_hide_wait, 0 if is_macos else 3)
self.ae(tuple(opts.color23), (255, 0, 0))
self.ae(opts.color23, Color(255, 0, 0))
self.assertFalse(opts.keymap)
opts = p('clear_all_shortcuts y', 'map f1 next_window')
self.ae(len(opts.keymap), 1)