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 @@ -155,6 +155,9 @@ def run(args: argparse.Namespace):
155155 "none" : "dummy-localqueue" ,
156156 }
157157
158+ if not args .command :
159+ sys .exit ("ERROR: you must provide a command" )
160+
158161 if args .gpu not in DEFAULT_QUEUES :
159162 sys .exit (f"ERROR: unsupported GPU { args .gpu } : no queue found" )
160163 queue_name = DEFAULT_QUEUES [args .gpu ]
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ def tempdir():
1717
1818def test_invalid_gpu (args : argparse .Namespace ):
1919 args .gpu = "invalid"
20+ args .command = ["true" ]
2021 with pytest .raises (SystemExit ) as err :
2122 CreateJobCommand .run (args )
2223
@@ -41,6 +42,7 @@ def test_create_job_nowait(
4142 args = parser .parse_args (["br" ])
4243 args .wait = False
4344 args .job_id = 123
45+ args .command = ["true" ]
4446
4547 mock_getcwd .return_value = tempdir
4648 mock_gethostname .return_value = "testhost"
You can’t perform that action at this time.
0 commit comments