def test_non_orphan_rejected_kept(self, event_non_orphaned_rejected_pick): """ Ensure rejected things are kept if their parents are not rejected. """ ev = prune_events(event_non_orphaned_rejected_pick)[0] # One pick gets removed, the other is kept assert len(ev.picks) == 1 assert ev.picks[0].evaluation_status == "rejected" por = obsplus.events.utils.get_preferred(ev, "origin") assert len(por.arrivals) == 1
def test_pick_gone(self, event_rejected_pick): """ Ensure the pick was removed. """ picks = prune_events(event_rejected_pick)[0].picks assert all([x.evaluation_status != "rejected" for x in picks])
def test_copy_made(self): """ Prune events should make a copy, not modify the original. """ cat = obspy.read_events() assert prune_events(cat) is not cat