Skip to content

Commit

Permalink
Fix and test Resources arginfo (#328)
Browse files Browse the repository at this point in the history
xref: #325

---------

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
njzjz and pre-commit-ci[bot] committed Apr 19, 2023
1 parent 6953c03 commit 09a614a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dpdispatcher/slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def resources_subfields(cls) -> List[Argument]:
"""
doc_slurm_job_size = "Number of tasks in a Slurm job"
arg = super().resources_subfields()[0]
arg["kwargs"].extend_subfields(
arg.extend_subfields(
[
Argument(
"slurm_job_size",
Expand Down
3 changes: 3 additions & 0 deletions tests/test_class_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ def test_resources_json(self):
self.assertTrue(resources_json_dict, self.resources_dict)
self.assertTrue(resources_json_dict, self.resources.serialize())

def test_arginfo(self):
self.resources.arginfo()

def test_load_from_json(self):
resources = Resources.load_from_json("jsons/resources.json")
self.assertTrue(resources, self.resources)

0 comments on commit 09a614a

Please sign in to comment.