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

17 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.blindness` module.""" 

2 

3from __future__ import annotations 

4 

5import numpy as np 

6from matplotlib.axes import Axes 

7from matplotlib.figure import Figure 

8 

9from colour.plotting import plot_cvd_simulation_Machado2009 

10 

11__author__ = "Colour Developers" 

12__copyright__ = "Copyright 2013 Colour Developers" 

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

14__maintainer__ = "Colour Developers" 

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

16__status__ = "Production" 

17 

18__all__ = [ 

19 "TestPlotCvdSimulationMachado2009", 

20] 

21 

22 

23class TestPlotCvdSimulationMachado2009: 

24 """ 

25 Define :func:`colour.plotting.blindness.plot_cvd_simulation_Machado2009` 

26 definition unit tests methods. 

27 """ 

28 

29 def test_plot_cvd_simulation_Machado2009(self) -> None: 

30 """ 

31 Test :func:`colour.plotting.blindness.plot_cvd_simulation_Machado2009` 

32 definition. 

33 """ 

34 

35 figure, axes = plot_cvd_simulation_Machado2009(np.random.rand(32, 32, 3)) 

36 

37 assert isinstance(figure, Figure) 

38 assert isinstance(axes, Axes)