weechat-matrix
weechat-matrix copied to clipboard
Color test uses unsupported module method causing `make test` to fail
In tests/color_test.py
the webcolors.HTML4_HEX_TO_NAMES
method is used to get the first 16 HTML colors. That method (and several others) were removed with a comment saying "Be absolutely clear about the mappings no longer being supported API."
In its test suite, the webcolors
module retrieves the first 16 color names from w3.org. You could replicate that logic (though it would add another dependency) or copy the list of colors (which I did to "make the test work"). I'll leave the decision up to you.
For reference, this is what I changed line 23 in tests/colors_test.py
to:
first_16_html_colors = ["black", "green", "silver", "lime", "gray", "olive", "white", "yellow", "maroon", "navy", "red", "blue", "purple", "teal", "fuchsia", "aqua"]
It would need adjusting to be PEP8 compliant, but was good enough for verification purposes.