Commits

James Bennett committed e947eb4

And update tests to get back to 100% coverage while I'm in there.

  • Participants
  • Parent commits 0f66194

Comments (0)

Files changed (2)

File docs/index.rst

        Traceback (most recent call last):
            ...
        ValueError: 'goldenrod' is not defined as a named color in html4.
+       >>> name_to_hex('goldenrod', spec='css5')
+       Traceback (most recent call last):
+           ...
+       TypeError: 'css5' is not a supported specification for color name lookups; supported specifications are: html4, css2, css21, css3.
 
    :param name: The color name to convert.
    :type name: str
        Traceback (most recent call last):
            ...
        ValueError: '#daa520' has no defined color name in html4.
+       >>> hex_to_name('#daa520', spec='css5')
+       Traceback (most recent call last):
+           ...
+       TypeError: 'css5' is not a supported specification for color name lookups; supported specifications are: html4, css2, css21, css3.
 
    :param hex_value: The hexadecimal color value to convert.
    :type hex_value: str

File webcolors.py

     Traceback (most recent call last):
         ...
     ValueError: 'goldenrod' is not defined as a named color in html4.
+    >>> name_to_hex('goldenrod', spec='css5')
+    Traceback (most recent call last):
+        ...
+    TypeError: 'css5' is not a supported specification for color name lookups; supported specifications are: html4, css2, css21, css3.
 
     """
     if spec not in SUPPORTED_SPECIFICATIONS:
     Traceback (most recent call last):
         ...
     ValueError: '#daa520' has no defined color name in html4.
+    >>> hex_to_name('#daa520', spec='css5')
+    Traceback (most recent call last):
+        ...
+    TypeError: 'css5' is not a supported specification for color name lookups; supported specifications are: html4, css2, css21, css3.
 
     """
     if spec not in SUPPORTED_SPECIFICATIONS: