Skip to content
Snippets Groups Projects
Commit 426ad8d4 authored by Erin (Josh) Rigler's avatar Erin (Josh) Rigler
Browse files

Fix unit test for FilterAlgorithm.get_nearest_time()

The previous unit test relied on broken behavior of get_nearest_time()
to pass. With get_nearest_time() fixed, the unit test needed to be
updated accordingly.
parent ffdb80da
No related branches found
No related tags found
1 merge request!338Function get_nearest_time() behaves as expected now
......@@ -313,7 +313,7 @@ def test_get_nearest__oneday_average():
f = FilterAlgorithm(input_sample_period=60.0, output_sample_period=86400.0)
step = f.get_filter_steps()[0]
time = UTCDateTime("2020-08-20T01:00:00")
aligned = get_nearest_time(step=step, output_time=time)
aligned = get_nearest_time(step=step, output_time=time, left=False)
# filter is average for day, should be first/last minute samples of 2020-08-20
assert_equal(aligned["data_start"], UTCDateTime("2020-08-20T00:00:00"))
assert_equal(aligned["time"], UTCDateTime("2020-08-20T11:59:30"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment