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

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

2

3 from __future__ import annotations

4

5 import numpy as np

6 from matplotlib.axes import Axes

7 from matplotlib.figure import Figure

8

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

23 class 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)