#!/usr/bin/env python

"""
this script can be run to build checksums for all the images generated by the tests

the output can be cut&pasted into the test file

and updated when neccessary.

"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from future import standard_library
standard_library.install_aliases()
from builtins import *
import os
import hashlib
from pprint import pprint

images_dir = "test_images_output"
checksums = {}
for name in os.listdir("test_images_output"):
    n = os.path.join("test_images_output", name)
    checksums[name] = hashlib.md5(open(n, 'rb').read()).hexdigest()

pprint(checksums)
