diff options
| author | Martin Fischer <martin@push-f.com> | 2025-06-26 06:25:50 +0200 |
|---|---|---|
| committer | Martin Fischer <martin@push-f.com> | 2025-06-28 07:09:44 +0200 |
| commit | 140c4bf995edc6a651d5ec7af9bbb3292c70bad4 (patch) | |
| tree | 002fd93e4cf42f8beab150d5aeb56db069dcdec9 | |
| parent | 84387f8a10f14131150eeb5c047382569af11f4d (diff) | |
test: add tests for ThreadColor initialization
| -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) |
