def METHOD_NAME(func, message, *args, **kwargs):
    __tracebackhide__ = True
    with pytest.raises(SystemExit) as error:
        func(*args, **kwargs)
    assert error.type == SystemExit
    assert error.value.code == 1
    if message:
        assert capsys.readouterr().err == message