I have written a test harness for system tests of our code using pytest. These tests are used in our continuous integration system so I am using the junit xml output option. The truncation of long strings by pytest is causing me problems. I know I can prevent it using the -vv option but then that gives verbose output for the results of each test which is difficult to read. Essentially I want a different way to prevent the truncation of the long string at least in the junit xml file. If it also worked in the console output, that would be better but not essential.
Our code produces reports with a large number of values and I compare the output to a set of output known to be correct. I am reporting all fields that are in error not just the first error. So I am generating a list of strings with one error per string. I then join the strings with newlines to create one long string and long string that contains all the errors. If the assertion fails I need to see the entire contents of the string which could be several hundred lines.
errors = []
error.extend(get_report_errors())
s = '\n'.join(errors)
assert (s == '')
Any suggestions
I am using python 2.6 and 2.7 and pytest 2.3.5. I can upgrade the version of pytest of needed.