Skip to content

Commit 64d580e

Browse files
committed
testsuite: cover JobID taking a JobID as input
Problem: There is no test coverage to ensure that the Python flux.job.JobID class can take a JobID as input. Add coverage in t/python/t0010-job.py.
1 parent eb364e5 commit 64d580e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

t/python/t0010-job.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,12 @@ def test_24_jobid(self):
468468
# Ensure encode back to same type works
469469
self.assertEqual(getattr(jobid, key), test[key])
470470

471+
# JobID can also take a JobID
472+
jobid1 = job.JobID(1234)
473+
jobid2 = job.JobID(jobid1)
474+
self.assertEqual(jobid1, jobid2)
475+
self.assertEqual(jobid2.orig, "1234")
476+
471477
def test_25_job_list_attrs(self):
472478
expected_attrs = [
473479
"userid",

0 commit comments

Comments
 (0)