diff options
Diffstat (limited to 'tests/test_text.py')
-rwxr-xr-x | tests/test_text.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_text.py b/tests/test_text.py index eb3d5c3..c29bb25 100755 --- a/tests/test_text.py +++ b/tests/test_text.py @@ -45,4 +45,19 @@ def test_rgba(test_input, expected): def test_hsla(test_input, expected): assert Color.from_text(test_input).hsla() == expected +@pytest.mark.parametrize('test_input,expected', ( + ('blue', + ('#0000FF',)), + (' rgb (1,22, 242 , 50.0% )', + ('#0116F2', 'rgba(1, 22, 242, 50%)')), + ('darker(10%, hsl(0, 1, 50.0%))', + ('#CC0000', 'hsl(0deg, 100%, 40%)')), + ('hls(0 / 1 0.5 , 0.2)', + ('#FFFFFF', 'rgba(255, 255, 255, 20%)', 'hsla(0deg, 50%, 100%, 20%)')), + ('hbw(127 .5)', + ('#00800F', 'hwb(127deg, 0%, 50%)')), +)) +def test_css(test_input, expected): + assert Color.from_text(test_input).css() == expected + # End of file. |