Skip to content

Commit

Permalink
remove mseed warning not raised anymore in seisan tests
Browse files Browse the repository at this point in the history
due to #1988
  • Loading branch information
megies committed Dec 5, 2017
1 parent 33f4df6 commit 7780c1d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions obspy/io/seisan/tests/test_core.py
Expand Up @@ -8,7 +8,6 @@

import os
import unittest
import warnings

import numpy as np

Expand Down Expand Up @@ -195,13 +194,8 @@ def test_read_obspy(self):
# 1 - little endian, 32 bit, version 7
st1 = read(os.path.join(self.path,
'2011-09-06-1311-36S.A1032_001BH_Z'))
# raises "UserWarning: Record contains a fractional seconds" - ignore
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter('always', UserWarning)
st2 = read(os.path.join(self.path,
'2011-09-06-1311-36S.A1032_001BH_Z.mseed'))
self.assertEqual(len(w), 1)
self.assertEqual(w[0].category, UserWarning)
st2 = read(os.path.join(self.path,
'2011-09-06-1311-36S.A1032_001BH_Z.mseed'))
self.assertEqual(len(st1), len(st2))
self.assertTrue(np.allclose(st1[0].data, st2[0].data))

Expand Down

0 comments on commit 7780c1d

Please sign in to comment.