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

21 statements  

« 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.notation` module.""" 

2 

3from __future__ import annotations 

4 

5from matplotlib.axes import Axes 

6from matplotlib.figure import Figure 

7 

8from 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 

26class 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.\ 

35plot_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 

44class 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.\ 

53plot_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)