From 0ec07a0422421bdd140799aae896482b60e0069b Mon Sep 17 00:00:00 2001 From: IshikaKhandelwal Date: Thu, 5 Oct 2023 10:59:45 -0700 Subject: [PATCH] "Added tests for SingleNodeScheduler" --- src/noisepy/seis/noise_module.py | 4 ++-- tests/test_scheduler.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/noisepy/seis/noise_module.py b/src/noisepy/seis/noise_module.py index 489e584c..eb38be71 100644 --- a/src/noisepy/seis/noise_module.py +++ b/src/noisepy/seis/noise_module.py @@ -14,7 +14,7 @@ # import pycwt import scipy -from numba import jit,float32 +from numba import jit from obspy.core.inventory import Channel, Inventory, Network, Site, Station from obspy.core.util.base import _get_function_from_entry_point from obspy.signal.filter import bandpass @@ -1257,7 +1257,7 @@ def portion_gaps(stream, starttime: obspy.UTCDateTime, endtime: obspy.UTCDateTim return pgaps -@jit("float32[:](float32[:],float32)",nopython=True) +@jit("float32[:](float32[:],float32)") def segment_interpolate(sig1, nfric): """ this function interpolates the data to ensure all points located on interger times of the diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py index d443964d..b2f8edfb 100644 --- a/tests/test_scheduler.py +++ b/tests/test_scheduler.py @@ -1,5 +1,6 @@ from noisepy.seis.scheduler import SingleNodeScheduler + def test_single_node_scheduler_get_indices(): single_node_scheduler = SingleNodeScheduler() items = ["a", "b", "c", "d"] @@ -8,8 +9,9 @@ def test_single_node_scheduler_get_indices(): assert indices == expected_indices + def test_synchronize(): scheduler = SingleNodeScheduler() result = scheduler.synchronize() - assert result is None \ No newline at end of file + assert result is None