James Bennett avatar James Bennett committed e947eb4

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

Comments (0)

Files changed (2)

        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
     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:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.