def METHOD_NAME(mock_packages):
    pkg_json = '{"packages": []}'
    with pytest.raises(spack.tag.TagIndexError) as e:
        spack.tag.TagIndex.from_json(io.StringIO(pkg_json), repository=mock_packages)
        assert "does not start with" in str(e)