()
| 1240 | |
| 1241 | |
| 1242 | def test_cn(): |
| 1243 | matplotlib.rcParams['axes.prop_cycle'] = cycler('color', |
| 1244 | ['blue', 'r']) |
| 1245 | assert mcolors.to_hex("C0") == '#0000ff' |
| 1246 | assert mcolors.to_hex("C1") == '#ff0000' |
| 1247 | |
| 1248 | matplotlib.rcParams['axes.prop_cycle'] = cycler('color', |
| 1249 | ['xkcd:blue', 'r']) |
| 1250 | assert mcolors.to_hex("C0") == '#0343df' |
| 1251 | assert mcolors.to_hex("C1") == '#ff0000' |
| 1252 | assert mcolors.to_hex("C10") == '#0343df' |
| 1253 | assert mcolors.to_hex("C11") == '#ff0000' |
| 1254 | |
| 1255 | matplotlib.rcParams['axes.prop_cycle'] = cycler('color', ['8e4585', 'r']) |
| 1256 | |
| 1257 | assert mcolors.to_hex("C0") == '#8e4585' |
| 1258 | # if '8e4585' gets parsed as a float before it gets detected as a hex |
| 1259 | # colour it will be interpreted as a very large number. |
| 1260 | # this mustn't happen. |
| 1261 | assert mcolors.to_rgb("C0")[0] != np.inf |
| 1262 | |
| 1263 | |
| 1264 | def test_conversions(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…