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

21 statements  

« prev     ^ index     » next       coverage.py v7.11.0, created at 2025-11-15 19:01 +1300

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

2 

3from __future__ import annotations 

4 

5from matplotlib.axes import Axes 

6from matplotlib.figure import Figure 

7 

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

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

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

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

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