Skip to content

Commit dc53800

Browse files
committed
Add more tests
1 parent ed22afb commit dc53800

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/uwtools/tests/test_schemas.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2150,6 +2150,9 @@ def test_schema_rocoto_task_resources():
21502150
"1:ppn=1+2:ppn=4:tpp=4+3:ppn=8:tpp=2",
21512151
]:
21522152
assert not errors(with_set(config, val, "nodes"))
2153+
# Other 'nodes' values are not ok:
2154+
assert "1 is not of type 'string'" in errors(with_set(config, 1, "nodes"))
2155+
assert "'1' does not match" in errors(with_set(config, "1", "nodes"))
21532156
# 'cores' or 'native' are allowed in place of 'nodes':
21542157
assert not errors(with_set(with_del(config, "nodes"), 8, "cores"))
21552158
assert not errors(with_set(with_del(config, "nodes"), "--slurm options", "native"))

0 commit comments

Comments
 (0)