diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_threads_color.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_threads_color.py b/tests/test_threads_color.py new file mode 100644 index 00000000..a5442359 --- /dev/null +++ b/tests/test_threads_color.py @@ -0,0 +1,16 @@ +from lib.threads.color import ThreadColor + + +def test_init_color_from_string_rgb(): + color = ThreadColor("rgb(170, 187, 204)") + assert color.rgb == (170, 187, 204) + + +def test_init_color_from_string_hex(): + color = ThreadColor("#AABBCC") + assert color.rgb == (170, 187, 204) + + +def test_init_color_from_string_hex_icc(): + color = ThreadColor("#AABBCC icc-color(Some-Profile, 0.1, 0.2, 0.3, 0.4)") + assert color.rgb == (170, 187, 204) |
