File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,9 @@ def run(args: argparse.Namespace):
186186 "none" : "dummy-localqueue" ,
187187 }
188188
189+ if not args .command :
190+ sys .exit ("ERROR: you must provide a command" )
191+
189192 if args .gpu not in DEFAULT_QUEUES :
190193 sys .exit (f"ERROR: unsupported GPU { args .gpu } : no queue found" )
191194 queue_name = DEFAULT_QUEUES [args .gpu ]
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ def tempdir():
1616
1717def test_invalid_gpu (args : argparse .Namespace ):
1818 args .gpu = "invalid"
19+ args .command = ["true" ]
1920 with pytest .raises (SystemExit ) as err :
2021 CreateJobCommand .run (args )
2122
@@ -40,6 +41,7 @@ def test_create_job_nowait(
4041 args = parser .parse_args (["br" ])
4142 args .wait = False
4243 args .job_id = 123
44+ args .command = ["true" ]
4345
4446 mock_getcwd .return_value = tempdir
4547 mock_gethostname .return_value = "testhost"
You can’t perform that action at this time.
0 commit comments