Coverage for plotting/tm3018/tests/test_report.py: 100%

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

2

3 from __future__ import annotations

4

5 from matplotlib.axes import Axes

6 from matplotlib.figure import Figure

7

8 from colour.colorimetry import SDS_ILLUMINANTS

9 from colour.plotting.tm3018.report import (

10 plot_single_sd_colour_rendition_report,

11 plot_single_sd_colour_rendition_report_full,

12 plot_single_sd_colour_rendition_report_intermediate,

13 plot_single_sd_colour_rendition_report_simple,

14)

15

16 __author__ = "Colour Developers"

17 __copyright__ = "Copyright 2013 Colour Developers"

18 __license__ = "BSD-3-Clause - https://opensource.org/licenses/BSD-3-Clause"

19 __maintainer__ = "Colour Developers"

20 __email__ = "colour-developers@colour-science.org"

21 __status__ = "Production"

22

23 __all__ = [

24 "TestPlotSingleSdColourRenditionReportFull",

25 "TestPlotSingleSdColourRenditionReportIntermediate",

26 "TestPlotSingleSdColourRenditionReportSimple",

27 "TestPlotSingleSdColourRenditionReport",

28]

29

30

31 class TestPlotSingleSdColourRenditionReportFull:

32 """

33 Define :func:`colour.plotting.tm3018.report.\

34 plot_single_sd_colour_rendition_report_full` definition unit tests methods.

35 """

36

37 def test_plot_single_sd_colour_rendition_report_full(self) -> None:

38 """

39 Test :func:`colour.plotting.tm3018.report.\

40 plot_single_sd_colour_rendition_report_full` definition.

41 """

42

43 figure, axes = plot_single_sd_colour_rendition_report_full(

44 SDS_ILLUMINANTS["FL2"]

45 )

46

47 assert isinstance(figure, Figure)

48 assert isinstance(axes, Axes)

49

50

51 class TestPlotSingleSdColourRenditionReportIntermediate:

52 """

53 Define :func:`colour.plotting.tm3018.report.\

54 plot_single_sd_colour_rendition_report_intermediate` definition unit tests

55 methods.

56 """

57

58 def test_plot_single_sd_colour_rendition_report_intermediate(self) -> None:

59 """

60 Test :func:`colour.plotting.tm3018.report.\

61 plot_single_sd_colour_rendition_report_intermediate` definition.

62 """

63

64 figure, axes = plot_single_sd_colour_rendition_report_intermediate(

65 SDS_ILLUMINANTS["FL2"]

66 )

67

68 assert isinstance(figure, Figure)

69 assert isinstance(axes, Axes)

70

71

72 class TestPlotSingleSdColourRenditionReportSimple:

73 """

74 Define :func:`colour.plotting.tm3018.report.\

75 plot_single_sd_colour_rendition_report_simple` definition unit tests methods.

76 """

77

78 def test_plot_color_vector_graphic(self) -> None:

79 """

80 Test :func:`colour.plotting.tm3018.report.\

81 plot_single_sd_colour_rendition_report_simple` definition.

82 """

83

84 figure, axes = plot_single_sd_colour_rendition_report_simple(

85 SDS_ILLUMINANTS["FL2"]

86 )

87

88 assert isinstance(figure, Figure)

89 assert isinstance(axes, Axes)

90

91

92 class TestPlotSingleSdColourRenditionReport:

93 """

94 Define :func:`colour.plotting.tm3018.report.\

95 plot_single_sd_colour_rendition_report` definition unit tests methods.

96 """

97

98 def test_plot_single_sd_colour_rendition_report(self) -> None:

99 """

100 Test :func:`colour.plotting.tm3018.report.\

101 plot_single_sd_colour_rendition_report` definition.

102 """

103

104 figure, axes = plot_single_sd_colour_rendition_report(SDS_ILLUMINANTS["FL2"])

105

106 assert isinstance(figure, Figure)

107 assert isinstance(axes, Axes)