Skip to content
Snippets Groups Projects
Commit 28c54f10 authored by Alan De Smet's avatar Alan De Smet
Browse files

Fix test

Remove timestamp if period >= 1 day
parent cf2f4e03
No related branches found
No related tags found
No related merge requests found
......@@ -605,7 +605,7 @@ class DownloaderTests(DTestCase):
timesteps = d.get_cache_filesets(end=test_datetime)
# This is a hard coded sanity test before getting to the
# overly clever dynamically generated test
self.assertEqual(repr(timesteps[0][0]),'<Example Downloader for Testing for 2019-05-27 00:00:00 at priority "" (empty string) (expected? True): {2019_05_27_147/avhrr-only-v2.20190527.nc: avhrr-only-v2.20190527.nc}>')
self.assertEqual(repr(timesteps[0][0]),'<Example Downloader for Testing for 2019-05-27 at priority "" (empty string) (expected? True): {2019_05_27_147/avhrr-only-v2.20190527.nc: avhrr-only-v2.20190527.nc}>')
for timestep in range(3):
idx = 0
days = range(27,22,-1)
......@@ -613,7 +613,7 @@ class DownloaderTests(DTestCase):
for day in subdays:
day_of_year = day+120
for prio,desc in {'': '"" (empty string)', '_preliminary': '"_preliminary"'}.items():
expected = f'<Example Downloader for Testing for 2019-05-{day} 00:00:00 at priority {desc} (expected? True): {{2019_05_{day}_{day_of_year}/avhrr-only-v2.201905{day}{prio}.nc: avhrr-only-v2.201905{day}{prio}.nc}}>'
expected = f'<Example Downloader for Testing for 2019-05-{day} at priority {desc} (expected? True): {{2019_05_{day}_{day_of_year}/avhrr-only-v2.201905{day}{prio}.nc: avhrr-only-v2.201905{day}{prio}.nc}}>'
self.assertEqual(repr(timesteps[timestep][idx]),expected)
idx += 1
......
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