Skip to content

Commit

Permalink
TEST: Minimum numpy >= 1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Aug 13, 2019
1 parent dbc5d12 commit 814727a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 1 addition & 4 deletions nibabel/tests/test_fileslice.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@

import numpy as np

# np > 1.11 makes double ellipsis illegal in indices
HAVE_NP_GT_1p11 = LooseVersion(np.__version__) > '1.11'

from ..fileslice import (is_fancy, canonical_slicers, fileslice,
predict_shape, read_segments, _positive_slice,
threshold_heuristic, optimize_slicer, slice2len,
Expand Down Expand Up @@ -46,7 +43,7 @@ def test_is_fancy():
_check_slice(slice0)
_check_slice((slice0,)) # tuple is same
# Double ellipsis illegal in np 1.12dev - set up check for that case
maybe_bad = HAVE_NP_GT_1p11 and slice0 is Ellipsis
maybe_bad = slice0 is Ellipsis
for slice1 in slices:
if maybe_bad and slice1 is Ellipsis:
continue
Expand Down
4 changes: 1 addition & 3 deletions nibabel/tests/test_floating.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@ def test_check_nmant_nexp():
assert_true(_check_nmant(t, ti['nmant']))
# Test fails for longdouble after blacklisting of OSX powl as of numpy
# 1.12 - see https://github.com/numpy/numpy/issues/8307
if (t != np.longdouble or
sys.platform != 'darwin' or
LooseVersion(np.__version__) < LooseVersion('1.12')):
if t != np.longdouble or sys.platform != 'darwin':
assert_true(_check_maxexp(t, ti['maxexp']))


Expand Down

0 comments on commit 814727a

Please sign in to comment.