File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 13
13
from matplotlib import _api , _c_internal_utils
14
14
import matplotlib .pyplot as plt
15
15
import matplotlib .colors as mcolors
16
+ import matplotlib .rcsetup as rcsetup
16
17
import numpy as np
17
18
from matplotlib .rcsetup import (
18
19
validate_bool ,
31
32
_listify_validator )
32
33
33
34
35
+ def test_rc_validators_in_sync ():
36
+ # make sure that matplotlibrc.template and rcsetup._validators
37
+ # are in sync.
38
+ rc = mpl ._rc_params_in_file (
39
+ 'matplotlibrc.template' ,
40
+ # Strip leading comment.
41
+ transform = lambda line : line [1 :] if line .startswith ("#" ) else line ,
42
+ fail_on_error = True )
43
+ for key , validator in rcsetup ._validators .items ():
44
+ if (key not in mpl ._deprecated_remain_as_none and
45
+ key not in mpl ._deprecated_ignore_map and
46
+ key [0 ] != '_' ):
47
+ assert key in list (rc .keys ())
48
+ for key in list (rc .keys ()):
49
+ assert key in list (rcsetup ._validators .keys ())
50
+
51
+
34
52
def test_rcparams (tmpdir ):
35
53
mpl .rc ('text' , usetex = False )
36
54
mpl .rc ('lines' , linewidth = 22 )
You can’t perform that action at this time.
0 commit comments