Beispiel #1
0
 def test_add_run_date_option(self, mock_worker):
     worker = make_ssh_files.main()
     assert worker.cli.parser._actions[4].dest == "run_date"
     expected = nemo_nowcast.cli.CommandLineInterface.arrow_date
     assert worker.cli.parser._actions[4].type == expected
     assert worker.cli.parser._actions[4].default == arrow.now().floor("day")
     assert worker.cli.parser._actions[4].help
Beispiel #2
0
 def test_add_archive_option(self, mock_worker):
     worker = make_ssh_files.main()
     assert worker.cli.parser._actions[6].dest == "archive"
     assert worker.cli.parser._actions[6].default is False
     assert worker.cli.parser._actions[6].help
Beispiel #3
0
 def test_add_text_file_option(self, mock_worker):
     worker = make_ssh_files.main()
     assert worker.cli.parser._actions[5].dest == "text_file"
     assert worker.cli.parser._actions[5].type == Path
     assert worker.cli.parser._actions[5].help
Beispiel #4
0
 def test_add_run_type_arg(self, mock_worker):
     worker = make_ssh_files.main()
     assert worker.cli.parser._actions[3].dest == "run_type"
     assert worker.cli.parser._actions[3].choices == {"nowcast", "forecast2"}
     assert worker.cli.parser._actions[3].help
Beispiel #5
0
 def test_instantiate_worker(self, mock_worker):
     worker = make_ssh_files.main()
     assert worker.name == "make_ssh_files"
     assert worker.description.startswith(
         "SalishSeaCast worker that generates a sea surface height boundary conditions file"
     )