MCPcopy Index your code
hub / github.com/RustPython/RustPython / InvalidRgbColorError

Class InvalidRgbColorError

Lib/test/test_enum.py:1906–1911  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1904
1905 def test_raise_custom_error_on_creation(self):
1906 class InvalidRgbColorError(ValueError):
1907 def __init__(self, r, g, b):
1908 self.r = r
1909 self.g = g
1910 self.b = b
1911 super().__init__(f'({r}, {g}, {b}) is not a valid RGB color')
1912
1913 with self.assertRaises(InvalidRgbColorError):
1914 class RgbColor(Enum):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by 1

__init__Method · 0.68