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

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

2

3 from __future__ import annotations

4

5 import tempfile

6

7 from colour.plotting import plot_automatic_colour_conversion_graph

8 from colour.utilities import is_networkx_installed, is_pydot_installed

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 "TestPlotAutomaticColourConversionGraph",

19]

20

21

22 class TestPlotAutomaticColourConversionGraph:

23 """

24 Define :func:`colour.plotting.graph.\

25 plot_automatic_colour_conversion_graph` definition unit tests methods.

26 """

27

28 def test_plot_automatic_colour_conversion_graph(self) -> None:

29 """

30 Test :func:`colour.plotting.graph.\

31 plot_automatic_colour_conversion_graph` definition.

32 """

33

34 if not is_pydot_installed() or not is_networkx_installed(): # pragma: no cover

35 return

36

37 plot_automatic_colour_conversion_graph( # pragma: no cover

38 f"{tempfile.mkstemp()[-1]}.png"

39 )