Skip to content

Commit

Permalink
Fix test_custom_uncert and test_gauss_uncert for mips*
Browse files Browse the repository at this point in the history
  • Loading branch information
Deni90 committed Sep 1, 2016
1 parent f3b1c05 commit 0188c7f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pyresample/test/test_kd_tree.py
Expand Up @@ -75,10 +75,10 @@ def test_gauss_uncert(self):
res, stddev, count = kd_tree.resample_gauss(self.tswath, self.tdata,
self.tgrid, 100000, sigma,
with_uncert=True)
self.assertFalse(
len(w) != 1, 'Failed to create neighbour warning')
self.assertFalse(('Searching' not in str(
w[0].message)), 'Failed to create correct neighbour warning')
self.assertTrue(
len(w) > 0, 'Failed to create neighbour warning')
self.assertTrue((any('Searching' in str(_w.message) for _w in w)),
'Failed to create correct neighbour warning')

expected_res = 2.20206560694
expected_stddev = 0.707115076173
Expand All @@ -98,10 +98,10 @@ def wf(dist):
res, stddev, counts = kd_tree.resample_custom(self.tswath,
self.tdata, self.tgrid,
100000, wf, with_uncert=True)
self.assertFalse(
len(w) != 1, 'Failed to create neighbour warning')
self.assertFalse(('Searching' not in str(
w[0].message)), 'Failed to create correct neighbour warning')
self.assertTrue(
len(w) > 0, 'Failed to create neighbour warning')
self.assertTrue((any('Searching' in str(_w.message) for _w in w)),
'Failed to create correct neighbour warning')

self.assertAlmostEqual(res[0], 2.32193149, 5,
'Failed to calculate custom weighting with uncertainty')
Expand Down

0 comments on commit 0188c7f

Please sign in to comment.