diff options
author | Thomas Touhey <thomas@touhey.fr> | 2019-05-06 12:33:42 +0200 |
---|---|---|
committer | Thomas Touhey <thomas@touhey.fr> | 2019-05-06 12:33:42 +0200 |
commit | 905958910dd4fe9926244c990d405789e063ed75 (patch) | |
tree | d38f49510e9e6b288c9eb59824ca8e765bd2de20 /tests | |
parent | bf4bb84d94a5855799d4638f7fe24c0891a89588 (diff) |
Corrected test format.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test_rgba.py (renamed from tests/test_all.py) | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/test_all.py b/tests/test_rgba.py index 73fa900..6781aa8 100755 --- a/tests/test_all.py +++ b/tests/test_rgba.py @@ -8,7 +8,7 @@ import pytest from thcolor import Color -_rgbcolors = ( +@pytest.mark.parametrize('test_input,expected', ( ('blue', ( 0, 0, 255, 1.0)), ('#12345F', ( 18, 52, 95, 1.0)), ('#123', ( 17, 34, 51, 1.0)), @@ -18,9 +18,7 @@ _rgbcolors = ( (' rgb (1,22, 242 , 50.0% )', ( 1, 22, 242, 0.5)), ('rgba(1,22,242,0.500)', ( 1, 22, 242, 0.5)), ('rbga(5, 7)', ( 5, 0, 7, 1.0)), - ('hsl(0, 1,50.0%)', (255, 0, 0, 1.0))) - -@pytest.mark.parametrize('test_input,expected', _rgbcolors) + ('hsl(0, 1,50.0%)', (255, 0, 0, 1.0)))) def test_rgba(test_input, expected): assert Color.from_text(test_input).rgba() == expected |