Skip to content

Commit

Permalink
MNT: Fix test to actually check numerics
Browse files Browse the repository at this point in the history
No clue why it was ever deemed a good idea to use string representation
of a value to check this (maybe no numpy dependence at the time?), but
it's breaking on Python 3.7. Move to a proper test with
assert_almost_equal.
  • Loading branch information
dopplershift committed Sep 14, 2017
1 parent faf1de4 commit d61756c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion siphon/tests/test_ncss.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def test_vertical_level(self):
self.nq.accept('csv').vertical_level(50000)
csv_data = self.ncss.get_data(self.nq)

assert str(csv_data['Temperature_isobaric'])[:6] == '263.39'
np.testing.assert_almost_equal(csv_data['Temperature_isobaric'], np.array([263.40]), 2)

@recorder.use_cassette('ncss_gfs_csv_point')
def test_raw_csv(self):
Expand Down

0 comments on commit d61756c

Please sign in to comment.