Wrapping python doctest results that are longer than 80 characters
Just figured out:
def long_string(): """ Returns a string which is wider than the recommended PEP8 linewidth >>> print long_string() 01234567890123456789012345678901234567890123456789012345678901234567890\12345678901234567890123456789 """ return '0123456789' * 10
Hope that helps somebody else out.
As suggested by davitenio and qris, I would recommend using the #doctest: +ELLIPSIS
directive, like so.
>>> from test.test_ppp import MockForm>>> form = MockForm(mock_file='no-errors.xlsx')>>> form.get_languages(settings_default='English', survey_header=... form.metadata['raw_data']['survey'][0]) #doctest: +ELLIPSIS['Ateso', 'English', 'Luganda', ... 'Runyoro-Rutoro']