Add resources tests
This commit is contained in:
parent
f00b406962
commit
bf8bce2fb1
4 changed files with 39 additions and 12 deletions
24
tests/test_resources.py
Normal file
24
tests/test_resources.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
"""Test resources module."""
|
||||
|
||||
from glicid_spawner.resources import CPU, GPU, RAM
|
||||
|
||||
|
||||
def test_glicid_default_resources():
|
||||
"""Test GLiCID default resources."""
|
||||
assert len(CPU) == 6
|
||||
assert CPU[0].description == '1'
|
||||
assert CPU[0].max_duration == 24
|
||||
assert CPU[-1].description == '24'
|
||||
assert CPU[-1].max_duration == 1
|
||||
|
||||
assert len(RAM) == 6
|
||||
assert RAM[0].description == '4 GB'
|
||||
assert RAM[0].max_duration == 24
|
||||
assert RAM[-1].description == '96 GB'
|
||||
assert RAM[-1].max_duration == 1
|
||||
|
||||
assert len(GPU) == 2
|
||||
assert GPU[0].description == 'No'
|
||||
assert GPU[0].max_duration == 24
|
||||
assert GPU[-1].description == 'A100'
|
||||
assert GPU[-1].max_duration == 1
|
Loading…
Add table
Add a link
Reference in a new issue