3737from colour .constants import TOLERANCE_ABSOLUTE_TESTS
3838from colour .hints import NDArrayFloat , cast
3939from colour .io import LUT3D , read_LUT
40- from colour .utilities import ignore_numpy_errors
40+ from colour .utilities import ignore_numpy_errors , is_scipy_installed
4141
4242__author__ = "Colour Developers"
4343__copyright__ = "Copyright 2013 Colour Developers"
@@ -835,6 +835,9 @@ class TestKernelInterpolator:
835835 def test_required_attributes (self ) -> None :
836836 """Test the presence of required attributes."""
837837
838+ if not is_scipy_installed (): # pragma: no cover
839+ return
840+
838841 required_attributes = (
839842 "x" ,
840843 "y" ,
@@ -872,6 +875,9 @@ def test_y(self) -> None:
872875 property.
873876 """
874877
878+ if not is_scipy_installed (): # pragma: no cover
879+ return
880+
875881 x = y = np .linspace (0 , 1 , 10 )
876882 kernel_interpolator = KernelInterpolator (x , y )
877883
@@ -942,6 +948,9 @@ def test__call__(self) -> None:
942948 method.
943949 """
944950
951+ if not is_scipy_installed (): # pragma: no cover
952+ return
953+
945954 x = np .arange (11 , 26 , 1 )
946955 y = np .sin (x / len (x ) * np .pi * 6 ) / (x / len (x )) + np .pi
947956 x_i = np .linspace (11 , 25 , 25 )
@@ -1176,6 +1185,9 @@ class unit tests methods.
11761185 def test_required_attributes (self ) -> None :
11771186 """Test the presence of required attributes."""
11781187
1188+ if not is_scipy_installed (): # pragma: no cover
1189+ return
1190+
11791191 required_attributes = ()
11801192
11811193 for attribute in required_attributes : # pragma: no cover
@@ -1212,6 +1224,9 @@ class TestLinearInterpolator:
12121224 def test_required_attributes (self ) -> None :
12131225 """Test the presence of required attributes."""
12141226
1227+ if not is_scipy_installed (): # pragma: no cover
1228+ return
1229+
12151230 required_attributes = ("x" , "y" )
12161231
12171232 for attribute in required_attributes :
@@ -1240,6 +1255,9 @@ def test__call__(self) -> None:
12401255 method.
12411256 """
12421257
1258+ if not is_scipy_installed (): # pragma: no cover
1259+ return
1260+
12431261 interval = 0.1
12441262 x = np .arange (len (DATA_POINTS_A ))
12451263 linear_interpolator = LinearInterpolator (x , DATA_POINTS_A )
@@ -1300,6 +1318,9 @@ class TestSpragueInterpolator:
13001318 def test_required_attributes (self ) -> None :
13011319 """Test the presence of required attributes."""
13021320
1321+ if not is_scipy_installed (): # pragma: no cover
1322+ return
1323+
13031324 required_attributes = ("x" , "y" )
13041325
13051326 for attribute in required_attributes :
@@ -1328,6 +1349,9 @@ def test__call__(self) -> None:
13281349 method.
13291350 """
13301351
1352+ if not is_scipy_installed (): # pragma: no cover
1353+ return
1354+
13311355 interval = 0.1
13321356 x = np .arange (len (DATA_POINTS_A ))
13331357 sprague_interpolator = SpragueInterpolator (x , DATA_POINTS_A )
@@ -1396,6 +1420,9 @@ def test__call__(self) -> None:
13961420 and is assumed to be unit tested thoroughly.
13971421 """
13981422
1423+ if not is_scipy_installed (): # pragma: no cover
1424+ return
1425+
13991426 np .testing .assert_allclose (
14001427 CubicSplineInterpolator (
14011428 np .linspace (0 , 1 , len (DATA_POINTS_A )), DATA_POINTS_A
@@ -1414,6 +1441,9 @@ class TestPchipInterpolator:
14141441 def test_required_attributes (self ) -> None :
14151442 """Test the presence of required attributes."""
14161443
1444+ if not is_scipy_installed (): # pragma: no cover
1445+ return
1446+
14171447 required_attributes = ("x" , "y" )
14181448
14191449 for attribute in required_attributes :
@@ -1432,6 +1462,9 @@ def test_y(self) -> None:
14321462 Test :attr:`colour.algebra.interpolation.PchipInterpolator.y` property.
14331463 """
14341464
1465+ if not is_scipy_installed (): # pragma: no cover
1466+ return
1467+
14351468 interpolator = PchipInterpolator (np .linspace (0 , 1 , 10 ), np .linspace (0 , 1 , 10 ))
14361469
14371470 interpolator .y = np .linspace (0 , 1 , 10 )
@@ -1448,6 +1481,9 @@ class TestNullInterpolator:
14481481 def test_required_attributes (self ) -> None :
14491482 """Test the presence of required attributes."""
14501483
1484+ if not is_scipy_installed (): # pragma: no cover
1485+ return
1486+
14511487 required_attributes = ("x" , "y" )
14521488
14531489 for attribute in required_attributes :
@@ -1478,6 +1514,9 @@ def test_y(self) -> None:
14781514 property.
14791515 """
14801516
1517+ if not is_scipy_installed (): # pragma: no cover
1518+ return
1519+
14811520 x = y = np .linspace (0 , 1 , 10 )
14821521 null_interpolator = NullInterpolator (x , y )
14831522
@@ -1531,6 +1570,9 @@ def test__call__(self) -> None:
15311570 method.
15321571 """
15331572
1573+ if not is_scipy_installed (): # pragma: no cover
1574+ return
1575+
15341576 x = np .arange (len (DATA_POINTS_A ))
15351577 null_interpolator = NullInterpolator (x , DATA_POINTS_A )
15361578 np .testing .assert_allclose (
0 commit comments