when informations gets truncated, mention use of "-vv" to see it.

This commit is contained in:
holger krekel 2012-11-30 12:18:12 +01:00
parent 725e63db66
commit 22dd5e29e2
2 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ def pytest_runtest_setup(item):
if new_expl: if new_expl:
# Don't include pageloads of data unless we are very verbose (-vv) # Don't include pageloads of data unless we are very verbose (-vv)
if len(''.join(new_expl[1:])) > 80*8 and item.config.option.verbose < 2: if len(''.join(new_expl[1:])) > 80*8 and item.config.option.verbose < 2:
new_expl[1:] = ['Detailed information too verbose, truncated'] new_expl[1:] = ['Detailed information truncated, use "-vv" to see']
res = '\n~'.join(new_expl) res = '\n~'.join(new_expl)
if item.config.getvalue("assertmode") == "rewrite": if item.config.getvalue("assertmode") == "rewrite":
# The result will be fed back a python % formatting # The result will be fed back a python % formatting

View File

@ -164,7 +164,7 @@ def test_assert_compare_truncate_longmessage(testdir):
result = testdir.runpytest() result = testdir.runpytest()
result.stdout.fnmatch_lines([ result.stdout.fnmatch_lines([
"*too verbose, truncated*", "*truncated*use*-vv*",
]) ])