def test_expand_hostlist_unvalid(): with pytest.raises(ValueError, match=r"hostlist unvalid"): _expand_hostlist("unvalid[]")
def test_expand_hostlist(hostlist, expected): assert _expand_hostlist(hostlist) == expected.split(",")