2Tests for `vendor_css_files`.
7from vendor_css_files import get_colour_variable
10@pytest.mark.parametrize(
14 ("--red: #ff0000;", "red", "#ff0000"),
15 # Variable whitespace between varname and hex string
16 ("--red: #ff0000;", "red", "#ff0000"),
18 ("--red: #ff0000ff;", "red", "#ff0000ff"),
19 # Three-digit hex in source
20 ("--grey: #999;", "grey", "#999999"),
23def test_get_colour_variable(css: str, name: str, colour: str) -> None:
25 Extract colour variables from CSS.
27 assert get_colour_variable(css, name=name) == colour