cache-v2-check.py 474 B

123456789101112131415
  1. from check_index import *
  2. def check_objects(o):
  3. assert is_list(o)
  4. assert len(o) == 1
  5. check_index_object(o[0], "cache", 2, 0, check_object_cache)
  6. def check_object_cache(o):
  7. assert sorted(o.keys()) == ["entries", "kind", "version"]
  8. # The "kind" and "version" members are handled by check_index_object.
  9. # FIXME: Check "entries" member
  10. assert is_dict(index)
  11. assert sorted(index.keys()) == ["cmake", "objects", "reply"]
  12. check_objects(index["objects"])