Add slurm cluster and partition len property

This commit is contained in:
Benoît Seignovert 2024-02-19 17:32:23 +01:00
parent fc54701400
commit 4eef9d7016
Signed by: Benoît Seignovert
GPG key ID: F5D8895227D18A0B
2 changed files with 10 additions and 0 deletions

View file

@ -73,6 +73,8 @@ def test_slurm_dataclasses():
assert str(partition) == 'standard' # = name
assert partition.name == 'standard'
assert len(partition) == 1
for _node in partition:
assert str(_node) == 'cnode001'
@ -87,6 +89,8 @@ def test_slurm_dataclasses():
assert cluster.name == 'nautilus'
assert cluster == 'nautilus' # __eq__
assert len(cluster) == 1
for _partition in cluster:
assert str(_partition) == 'standard'