Skip to content

Commit 5a5abb0

Browse files
committed
Add quick tests for Color.rgb property
1 parent c0c5977 commit 5a5abb0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/unit/color/test_color_type.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,16 @@ def test_color_normalized_property():
190190
assert colors.GRAY.normalized == (128 / 255, 128 / 255, 128 / 255, 1.0)
191191

192192

193+
def test_color_rgb_property():
194+
# Try some bounds
195+
assert colors.WHITE.rgb == (255, 255, 255)
196+
assert colors.BLACK.rgb == (0, 0, 0)
197+
198+
# Spot check unique colors
199+
assert colors.COBALT.rgb == (0, 71, 171)
200+
assert Color(1,3,5,7) == (1, 3, 5)
201+
202+
193203
def test_deepcopy_color_values():
194204
expected_color = Color(255, 255, 255, 255)
195205
assert deepcopy(expected_color) == expected_color

0 commit comments

Comments
 (0)