Coverage for plotting/tests/test_characterisation.py: 100%
21 statements
« prev ^ index » next coverage.py v7.11.0, created at 2025-11-16 22:49 +1300
« prev ^ index » next coverage.py v7.11.0, created at 2025-11-16 22:49 +1300
1"""Define the unit tests for the :mod:`colour.plotting.characterisation` module."""
3from __future__ import annotations
5from matplotlib.axes import Axes
6from matplotlib.figure import Figure
8from colour.plotting import plot_multi_colour_checkers, plot_single_colour_checker
10__author__ = "Colour Developers"
11__copyright__ = "Copyright 2013 Colour Developers"
12__license__ = "BSD-3-Clause - https://opensource.org/licenses/BSD-3-Clause"
13__maintainer__ = "Colour Developers"
14__email__ = "colour-developers@colour-science.org"
15__status__ = "Production"
17__all__ = [
18 "TestPlotSingleColourChecker",
19 "TestPlotMultiColourCheckers",
20]
23class TestPlotSingleColourChecker:
24 """
25 Define :func:`colour.plotting.characterisation.plot_single_colour_checker`
26 definition unit tests methods.
27 """
29 def test_plot_single_colour_checker(self) -> None:
30 """
31 Test :func:`colour.plotting.characterisation.\
32plot_single_colour_checker` definition.
33 """
35 figure, axes = plot_single_colour_checker()
37 assert isinstance(figure, Figure)
38 assert isinstance(axes, Axes)
41class TestPlotMultiColourCheckers:
42 """
43 Define :func:`colour.plotting.characterisation.plot_multi_colour_checkers`
44 definition unit tests methods.
45 """
47 def test_plot_multi_colour_checkers(self) -> None:
48 """
49 Test :func:`colour.plotting.characterisation.\
50plot_multi_colour_checkers` definition.
51 """
53 figure, axes = plot_multi_colour_checkers(
54 ["ColorChecker 1976", "ColorChecker 2005"]
55 )
57 assert isinstance(figure, Figure)
58 assert isinstance(axes, Axes)