Skip to content

Commit 688d877

Browse files
committed
revert change in test_color_brewer_extendability
1 parent f8c6b8e commit 688d877

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

tests/test_utilities.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ def test_color_brewer_reverse():
4343
assert scheme[::-1] == scheme_r
4444

4545

46-
@pytest.mark.parametrize("sname", core_schemes)
47-
def test_color_brewer_extendability(sname):
46+
def test_color_brewer_extendability():
4847
"""
4948
The non-qualitative schemes should be extendable.
5049
@@ -56,20 +55,21 @@ def test_color_brewer_extendability(sname):
5655
Indeed, in color_brewer, the key searched in the scheme database was not found,
5756
thus, it was passing `None` instead of a real scheme vector to linear_gradient.
5857
"""
59-
for n in range(color_brewer_minimum_n, color_brewer_maximum_n + 1):
60-
try:
61-
scheme = ut.color_brewer(sname, n=n)
62-
except Exception as e:
63-
if scheme_info[sname] == "Qualitative" and isinstance(e, ValueError):
64-
continue
65-
raise
66-
67-
assert len(scheme) == n
68-
69-
# When we try to extend a scheme,
70-
# the reverse is not always the exact reverse vector of the original one.
71-
# Thus, we do not test this property!
72-
_ = ut.color_brewer(sname + "_r", n=n)
58+
for sname in core_schemes:
59+
for n in range(color_brewer_minimum_n, color_brewer_maximum_n + 1):
60+
try:
61+
scheme = ut.color_brewer(sname, n=n)
62+
except Exception as e:
63+
if scheme_info[sname] == "Qualitative" and isinstance(e, ValueError):
64+
continue
65+
raise
66+
67+
assert len(scheme) == n
68+
69+
# When we try to extend a scheme,
70+
# the reverse is not always the exact reverse vector of the original one.
71+
# Thus, we do not test this property!
72+
_ = ut.color_brewer(sname + "_r", n=n)
7373

7474

7575
def test_color_avoid_unexpected_error():

0 commit comments

Comments
 (0)