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

1"""Define the unit tests for the :mod:`colour.plotting.notation` 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 (

9 plot_multi_munsell_value_functions,

10 plot_single_munsell_value_function,

11)

12

13 __author__ = "Colour Developers"

14 __copyright__ = "Copyright 2013 Colour Developers"

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

16 __maintainer__ = "Colour Developers"

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

18 __status__ = "Production"

19

20 __all__ = [

21 "TestPlotSingleMunsellValueFunction",

22 "TestPlotMultiMunsellValueFunctions",

23]

24

25

26 class TestPlotSingleMunsellValueFunction:

27 """

28 Define :func:`colour.plotting.notation.plot_single_munsell_value_function`

29 definition unit tests methods.

30 """

31

32 def test_plot_single_munsell_value_function(self) -> None:

33 """

34 Test :func:`colour.plotting.notation.\

35 plot_single_munsell_value_function` definition.

36 """

37

38 figure, axes = plot_single_munsell_value_function("ASTM D1535")

39

40 assert isinstance(figure, Figure)

41 assert isinstance(axes, Axes)

42

43

44 class TestPlotMultiMunsellValueFunctions:

45 """

46 Define :func:`colour.plotting.notation.plot_multi_munsell_value_functions`

47 definition unit tests methods.

48 """

49

50 def test_plot_multi_munsell_value_functions(self) -> None:

51 """

52 Test :func:`colour.plotting.notation.\

53 plot_multi_munsell_value_functions` definition.

54 """

55

56 figure, axes = plot_multi_munsell_value_functions(["ASTM D1535", "McCamy 1987"])

57

58 assert isinstance(figure, Figure)

59 assert isinstance(axes, Axes)