File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,38 @@ def test_file_times():
179179 ]
180180 assert _times == step_times
181181
182+ _times = gen .get_file_times ("0001-01-01" , timestep = "year" )
183+ assert _times == [
184+ "0001" ,
185+ "0002" ,
186+ "0003" ,
187+ "0004" ,
188+ "0005" ,
189+ "0006" ,
190+ "0007" ,
191+ "0008" ,
192+ "0009" ,
193+ "0010" ,
194+ "0011" ,
195+ "0012" ,
196+ ]
197+
198+ _times = gen .get_file_times ("0001-01-01" , timestep = "yearly-year-month-day" )
199+ assert _times == [
200+ "0001-01-01" ,
201+ "0002-01-01" ,
202+ "0003-01-01" ,
203+ "0004-01-01" ,
204+ "0005-01-01" ,
205+ "0006-01-01" ,
206+ "0007-01-01" ,
207+ "0008-01-01" ,
208+ "0009-01-01" ,
209+ "0010-01-01" ,
210+ "0011-01-01" ,
211+ "0012-01-01" ,
212+ ]
213+
182214
183215def test_to_netcdf ():
184216 ntimes = 12
You can’t perform that action at this time.
0 commit comments