Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_valueerror(kwargs):
with pytest.raises(ValueError) as excinfo:
JuliaOptions(**kwargs)
assert "Option" in str(excinfo.value)
assert "accept" in str(excinfo.value)
def test_as_args(kwargs, args):
assert JuliaOptions(**kwargs).as_args() == args
def test_unsupported(kwargs):
with pytest.raises(TypeError) as excinfo:
JuliaOptions(**kwargs)
assert "Unsupported Julia option(s): " in str(excinfo.value)
for key in kwargs:
assert key in str(excinfo.value)