Skip to content

Commit 360d6cb

Browse files
grondogarlick
authored andcommitted
testsuite: test jobspec queue property
Problem: The jobspec "queue" property is not tested. Add tests to python/t0010-job.py that test the getter and setter for this property.
1 parent fcd7a06 commit 360d6cb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

t/python/t0010-job.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,16 @@ def test_12_environment(self):
152152
jobspec.environment = new_env
153153
self.assertEqual(jobspec.environment, new_env)
154154

155+
def test_12_0_queue(self):
156+
jobspec = Jobspec.from_yaml_stream(self.basic_jobspec)
157+
jobspec.queue = "default"
158+
self.assertEqual(jobspec.queue, "default")
159+
160+
def test_12_1_queue_invalid(self):
161+
jobspec = Jobspec.from_yaml_stream(self.basic_jobspec)
162+
with self.assertRaises(TypeError):
163+
jobspec.queue = 12
164+
155165
def test_13_job_kvs(self):
156166
jobid = job.submit(self.fh, self.basic_jobspec, waitable=True)
157167
job.wait(self.fh, jobid=jobid)

0 commit comments

Comments
 (0)