Added regression tests for formats.py.