@@ -43,8 +43,7 @@ def test_color_brewer_reverse():
43
43
assert scheme [::- 1 ] == scheme_r
44
44
45
45
46
- @pytest .mark .parametrize ("sname" , core_schemes )
47
- def test_color_brewer_extendability (sname ):
46
+ def test_color_brewer_extendability ():
48
47
"""
49
48
The non-qualitative schemes should be extendable.
50
49
@@ -56,20 +55,21 @@ def test_color_brewer_extendability(sname):
56
55
Indeed, in color_brewer, the key searched in the scheme database was not found,
57
56
thus, it was passing `None` instead of a real scheme vector to linear_gradient.
58
57
"""
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 )
73
73
74
74
75
75
def test_color_avoid_unexpected_error ():
0 commit comments