def test_disjoint(self, disjointed_stream): """ Ensure nothing is returned if waveforms have no times were all three channels have data. """ out = stream2contiguous(disjointed_stream) assert inspect.isgenerator(out) slist = list(out) assert not len(slist)
def test_one_trace_gap(self, one_trace_gap_overlaps_stream): """ Ensure nothing is returned if waveforms has not times were all three channels have data. """ st = one_trace_gap_overlaps_stream out = stream2contiguous(st) assert inspect.isgenerator(out) slist = list(out) assert len(slist) == 2 for st_out in slist: assert not len(st_out.get_gaps())
def test_contiguous(self, basic_stream_with_gap): """Test basic functionality.""" st, st1, st2 = basic_stream_with_gap out = stream2contiguous(st) assert inspect.isgenerator(out) slist = list(out) assert len(slist) == 2 st_out_1 = slist[0] st_out_2 = slist[1] # lengths should be equal assert len(st_out_1) == len(st1) assert len(st_out_2) == len(st2) # streams should be equal assert self.streams_are_equal(st_out_1, st1) assert self.streams_are_equal(st_out_2, st2)