Skip to content

Commit

Permalink
Assuage codecov
Browse files Browse the repository at this point in the history
- add a test covering typecheck on time_period
- fix bug (isinstance args were permuted in fourier_coefficients.py)
  • Loading branch information
kkappler committed Jan 9, 2024
1 parent 76cdca1 commit 45d6182
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion aurora/pipelines/fourier_coefficients.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def decimation_and_stft_config_creator(
dd.sample_rate_decimation = current_sample_rate

if time_period:
if isinstance(mt_metadata.timeseries.time_period.TimePeriod, time_period):
if isinstance(time_period, mt_metadata.timeseries.time_period.TimePeriod):
dd.time_period = time_period
else:
msg = (
Expand Down
5 changes: 5 additions & 0 deletions tests/synthetic/test_fourier_coefficients.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ def test_123(self):

def test_decimation_and_stft_config_creator(self):
cfgs = decimation_and_stft_config_creator(1.0)

# test time period must of of type
with self.assertRaises(NotImplementedError):
time_period = ["2023-01-01T17:48:59", "2023-01-09T08:54:08"]
decimation_and_stft_config_creator(1.0, time_period=time_period)
return cfgs

def test_create_then_use_stored_fcs_for_processing(self):
Expand Down

0 comments on commit 45d6182

Please sign in to comment.