Skip to content

Commit

Permalink
Skip a test on aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
ericpre committed Jun 30, 2021
1 parent 0659013 commit 595be28
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions hyperspy/tests/axes/test_data_axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import copy
import math
import platform
from unittest import mock

import numpy as np
Expand Down Expand Up @@ -525,16 +526,18 @@ def test_uniform_value2index(self):
assert np.all(self.axis.value2index(arval.tolist()) \
== np.array([[1, 1], [2, 3]]))
#One value out of bound in array in --> error out (both sides)
arval[1,1] = 111
arval[1, 1] = 111
with pytest.raises(ValueError):
self.axis.value2index(arval)
arval[1,1] = -0.3
arval[1, 1] = -0.3
with pytest.raises(ValueError):
self.axis.value2index(arval)
#One NaN in array in --> error out
arval[1,1] = np.nan
with pytest.raises(ValueError):
self.axis.value2index(arval)
if platform.machine() != 'aarch64':
# Skip aarch64 platform because it doesn't raise error
arval[1, 1] = np.nan
with pytest.raises(ValueError):
self.axis.value2index(arval)

#Copy of axis with units
axis = copy.deepcopy(self.axis)
Expand Down

0 comments on commit 595be28

Please sign in to comment.