Skip to content

Commit

Permalink
Reduce atol for IQ tests, remove version dep in travis
Browse files Browse the repository at this point in the history
Signed-off-by: Håkon Wiik Ånes <hwaanes@gmail.com>
  • Loading branch information
hakonanes committed May 1, 2020
1 parent 1bdc15e commit 0a1ae6f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Expand Up @@ -5,8 +5,8 @@ env:
global:
- ENV=conda
# TODO: Get dependencies from setup.py
- DEPS="dask[array]>=2.14 hyperspy>=1.5.2 h5py>=2.10 matplotlib>=3.2 numpy>=1.18 numba>=0.48 pyxem>=0.10 scikit-image>=0.16 scikit-learn>=0.22 scipy>=1.4"
- TEST_DEPS="pytest>=5.4 pytest-cov>=2.8.1 coveralls coverage==4.5.4"
- DEPS="dask[array] hyperspy h5py matplotlib numpy numba pyxem scikit-image scikit-learn scipy"
- TEST_DEPS="pytest pytest-cov coveralls coverage" # ==4.5.4
- PYTHON_CONDA=3.7
- DEPLOY=false

Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
- PYTHON_CONDA=3.8
language: shell # python is not recognised on osx or windows

- name: "Python 3.7 with pip on macOS 10.14"
- name: "Python 3.7.6 with pip on macOS 10.14"
os: osx
osx_image: xcode11.3
env:
Expand Down
4 changes: 2 additions & 2 deletions kikuchipy/util/test/test_pattern.py
Expand Up @@ -292,13 +292,13 @@ def test_get_image_quality_white_noise(self):
p = np.random.random((1001, 1001))
iq = kp.util.pattern.get_image_quality(pattern=p, normalize=True)

assert np.allclose(iq, 0, atol=1e-3)
assert np.allclose(iq, 0, atol=1e-2)

def test_get_image_quality_flat(self):
p = np.ones((1001, 1001)) * 5
iq = kp.util.pattern.get_image_quality(pattern=p, normalize=False)

assert np.allclose(iq, 1, atol=1e-3)
assert np.allclose(iq, 1, atol=1e-2)

@pytest.mark.parametrize(
"shape, answer",
Expand Down

0 comments on commit 0a1ae6f

Please sign in to comment.