Commit 11e2ae50 authored by Javier Quinteros's avatar Javier Quinteros

Add test for the case in which chstop is undefined

parent ce91799b
......@@ -32,6 +32,29 @@ class ConversionTests(unittest.TestCase):
def testChstopUndefined(self):
"""chstop undefined"""
directory = '/Users/javier/Nextcloud/share_Philippe'
# Start of the time window close to the beginning of the file
stt = datetime(2018, 9, 5, 9, 54, 3)
# Take only 1 second
ett = stt + timedelta(seconds=1)
orig = read('testChstopUndefined.mseed')
t = TDMS('PDN_1km', directory, chstart=766, starttime=stt, endtime=ett)
with t:
for data in t:
aux = Trace(data=data[0], header=data[1])
conv = Stream([aux])
# Merge Traces
self.assertTrue(np.array_equal(orig[0].data, conv[0].data), 'Wrong comparison for chstop undefined!')
# self.assertEqual(orig[0].stats, conv[0].stats, 'Wrong comparison for one record and one channel!')
def testOneChannel(self):
"""One record from one channel"""
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment