Coverage for plotting/tests/test_characterisation.py: 100%

1"""Define the unit tests for the :mod:`colour.plotting.characterisation` module."""

2

3 from __future__ import annotations

4

5 from matplotlib.axes import Axes

6 from matplotlib.figure import Figure

7

8 from colour.plotting import plot_multi_colour_checkers, plot_single_colour_checker

9

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"

16

17 __all__ = [

18 "TestPlotSingleColourChecker",

19 "TestPlotMultiColourCheckers",

20]

21

22

23 class TestPlotSingleColourChecker:

24 """

25 Define :func:`colour.plotting.characterisation.plot_single_colour_checker`

26 definition unit tests methods.

27 """

28

29 def test_plot_single_colour_checker(self) -> None:

30 """

31 Test :func:`colour.plotting.characterisation.\

32 plot_single_colour_checker` definition.

33 """

34

35 figure, axes = plot_single_colour_checker()

36

37 assert isinstance(figure, Figure)

38 assert isinstance(axes, Axes)

39

40

41 class TestPlotMultiColourCheckers:

42 """

43 Define :func:`colour.plotting.characterisation.plot_multi_colour_checkers`

44 definition unit tests methods.

45 """

46

47 def test_plot_multi_colour_checkers(self) -> None:

48 """

49 Test :func:`colour.plotting.characterisation.\

50 plot_multi_colour_checkers` definition.

51 """

52

53 figure, axes = plot_multi_colour_checkers(

54 ["ColorChecker 1976", "ColorChecker 2005"]

55 )

56

57 assert isinstance(figure, Figure)

58 assert isinstance(axes, Axes)