visual tests: generate failure report even if you ctrl-c the process early

This commit is contained in:
Dane Springmeyer 2014-07-29 17:23:09 -07:00
parent 0215a3cf04
commit 65452698ff

View file

@ -434,18 +434,20 @@ if __name__ == "__main__":
os.makedirs(visual_output_dir)
reporting = Reporting(quiet, overwrite_failures)
for filename in files:
config = dict(defaults)
config.update(files[filename])
for size in config['sizes']:
for scale_factor in config['scales']:
m = render(filename,
config,
size[0],
size[1],
config.get('bbox'),
scale_factor,
reporting)
mapnik.save_map(m, os.path.join(dirname, 'xml_output', "%s-out.xml" % filename))
try:
for filename in files:
config = dict(defaults)
config.update(files[filename])
for size in config['sizes']:
for scale_factor in config['scales']:
m = render(filename,
config,
size[0],
size[1],
config.get('bbox'),
scale_factor,
reporting)
#mapnik.save_map(m, os.path.join(dirname, 'xml_output', "%s-out.xml" % filename))
except KeyboardInterrupt:
pass
sys.exit(reporting.summary())