def METHOD_NAME(tmp_path):
    content = b"What? This ain't no ASDF file"
    path = os.path.join(str(tmp_path), "test.asdf")
    buff = io.BytesIO(content)
    with pytest.raises(
        ValueError,
        match=r"Does not appear to be a ASDF file.",
    ):
        asdf.open(buff)
    with open(path, "wb") as fd:
        fd.write(content)
    with open(path, "rb") as fd, pytest.raises(
        ValueError,
        match=r"Does not appear to be a ASDF file.",
    ):
        asdf.open(fd)