Skip to content

Commit 31c05be

Browse files
committed
scipy required
1 parent 0161159 commit 31c05be

File tree

3 files changed

+1
-32
lines changed

3 files changed

+1
-32
lines changed

cf/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199
)
200200

201201
# Check the version of cfdm
202-
_minimum_vn = "1.11.0.0"
202+
_minimum_vn = "1.11.0.0b2"
203203
_maximum_vn = "1.11.1.0"
204204
_cfdm_version = Version(cfdm.__version__)
205205
if not Version(_minimum_vn) <= _cfdm_version < Version(_maximum_vn):

cf/test/test_Field.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
import numpy
1111
import numpy as np
12-
1312
from scipy.ndimage import convolve1d
1413

1514
faulthandler.enable() # to debug seg faults and timeouts
@@ -2318,9 +2317,6 @@ def test_Field_percentile(self):
23182317
# TODO: add loop to check get same shape and close enough data
23192318
# for every possible axis combo (see also test_Data_percentile).
23202319

2321-
@unittest.skipIf(
2322-
not SCIPY_AVAILABLE, "scipy must be installed for this test."
2323-
)
23242320
def test_Field_grad_xy(self):
23252321
f = cf.example_field(0)
23262322

@@ -2406,9 +2402,6 @@ def test_Field_grad_xy(self):
24062402
y.dimension_coordinate("X").standard_name, "longitude"
24072403
)
24082404

2409-
@unittest.skipIf(
2410-
not SCIPY_AVAILABLE, "scipy must be installed for this test."
2411-
)
24122405
def test_Field_laplacian_xy(self):
24132406
f = cf.example_field(0)
24142407

cf/test/test_Maths.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,12 @@
22
import faulthandler
33
import unittest
44

5-
6-
SCIPY_AVAILABLE = False
7-
try:
8-
# We don't need SciPy directly in this test, it is only required by code
9-
# here which uses 'convolve1d' under-the-hood. Without it installed, get:
10-
#
11-
# NameError: name 'convolve1d' is not defined. Did you
12-
# mean: 'cf_convolve1d'?
13-
import scipy
14-
15-
SCIPY_AVAILABLE = True
16-
# not 'except ImportError' as that can hide nested errors, catch anything:
17-
except Exception:
18-
pass # test with this dependency will then be skipped by unittest
19-
205
faulthandler.enable() # to debug seg faults and timeouts
216

227
import cf
238

249

2510
class MathTest(unittest.TestCase):
26-
@unittest.skipIf(
27-
not SCIPY_AVAILABLE, "scipy must be installed for this test."
28-
)
2911
def test_curl_xy(self):
3012
f = cf.example_field(0)
3113

@@ -115,9 +97,6 @@ def test_curl_xy(self):
11597
c.dimension_coordinate("X").standard_name, "longitude"
11698
)
11799

118-
@unittest.skipIf(
119-
not SCIPY_AVAILABLE, "scipy must be installed for this test."
120-
)
121100
def test_div_xy(self):
122101
f = cf.example_field(0)
123102

@@ -206,9 +185,6 @@ def test_div_xy(self):
206185
d.dimension_coordinate("X").standard_name, "longitude"
207186
)
208187

209-
@unittest.skipIf(
210-
not SCIPY_AVAILABLE, "scipy must be installed for this test."
211-
)
212188
def test_differential_operators(self):
213189
f = cf.example_field(0)
214190

0 commit comments

Comments
 (0)