Skip to content
This repository was archived by the owner on Dec 12, 2023. It is now read-only.

Commit c93df75

Browse files
committed
Improve branch coverage
1 parent 4933a03 commit c93df75

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

tests/test_color_objects.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,20 @@ def test_set_from_rgb_hex(self):
363363
rgb = sRGBColor.new_from_rgb_hex('#7bc832')
364364
self.assertColorMatch(rgb, sRGBColor(0.482, 0.784, 0.196))
365365

366+
def test_set_from_rgb_hex_no_sharp(self):
367+
rgb = sRGBColor.new_from_rgb_hex('7bc832')
368+
self.assertColorMatch(rgb, sRGBColor(0.482, 0.784, 0.196))
369+
370+
def test_set_from_rgb_hex_invalid_length(self):
371+
with self.assertRaises(ValueError):
372+
sRGBColor.new_from_rgb_hex('#ccc')
373+
374+
def test_get_upscaled_value_tuple(self):
375+
self.assertEqual(
376+
self.color.get_upscaled_value_tuple(),
377+
(123, 200, 50),
378+
)
379+
366380

367381
class HSLConversionTestCase(BaseColorConversionTest):
368382
def setUp(self):

0 commit comments

Comments
 (0)