Could you please use # doctest: +NORMALIZE_WHITESPACE to reformat the expected output on multiple lines (see http://docs.python.org/2/library/doctest.html#directives) to make that more readable?