Beispiel #1
0
 def test_add_backfill_date_option(self, mock_worker):
     worker = collect_weather.main()
     assert worker.cli.parser._actions[6].dest == "backfill_date"
     expected = nemo_nowcast.cli.CommandLineInterface.arrow_date
     assert worker.cli.parser._actions[6].type == expected
     assert worker.cli.parser._actions[6].default == arrow.now().floor("day").shift(
         days=-1
     )
     assert worker.cli.parser._actions[6].help
Beispiel #2
0
 def test_instantiate_worker(self, mock_worker):
     worker = collect_weather.main()
     assert worker.name == "collect_weather"
     assert worker.description.startswith(
         "SalishSeaCast worker that monitors a mirror of HRDPS files from the ECCC MSC datamart"
     )
Beispiel #3
0
 def test_add_resolution_arg(self, mock_worker):
     worker = collect_weather.main()
     assert worker.cli.parser._actions[4].dest == "resolution"
     assert worker.cli.parser._actions[4].choices == {"1km", "2.5km"}
     assert worker.cli.parser._actions[4].default == "2.5km"
     assert worker.cli.parser._actions[4].help
Beispiel #4
0
 def test_add_backfill_option(self, mock_worker):
     worker = collect_weather.main()
     assert worker.cli.parser._actions[5].dest == "backfill"
     assert worker.cli.parser._actions[5].default is False
     assert worker.cli.parser._actions[5].help
Beispiel #5
0
 def test_add_forecast_arg(self, mock_worker):
     worker = collect_weather.main()
     assert worker.cli.parser._actions[3].dest == "forecast"
     assert worker.cli.parser._actions[3].choices == {"00", "06", "12", "18"}
     assert worker.cli.parser._actions[3].help