def METHOD_NAME():
    """Tests spack location --source-dir with a missing source directory."""
    spec = "mpileaks"
    prefix = "==> Error: "
    expected = (
        "%sSource directory does not exist yet. Run this to create it:"
        "%s  spack stage %s" % (prefix, os.linesep, spec)
    )
    out = location("--source-dir", spec, fail_on_error=False).strip()
    assert out == expected