From 22dd5e29e264a2b0e69531ced48f2060e1153012 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Fri, 30 Nov 2012 12:18:12 +0100 Subject: [PATCH] when informations gets truncated, mention use of "-vv" to see it. --- _pytest/assertion/__init__.py | 2 +- testing/test_assertion.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_pytest/assertion/__init__.py b/_pytest/assertion/__init__.py index 4ead44fca..b7ec1924d 100644 --- a/_pytest/assertion/__init__.py +++ b/_pytest/assertion/__init__.py @@ -78,7 +78,7 @@ def pytest_runtest_setup(item): if new_expl: # 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: - new_expl[1:] = ['Detailed information too verbose, truncated'] + new_expl[1:] = ['Detailed information truncated, use "-vv" to see'] res = '\n~'.join(new_expl) if item.config.getvalue("assertmode") == "rewrite": # The result will be fed back a python % formatting diff --git a/testing/test_assertion.py b/testing/test_assertion.py index 3ebc3cdcb..4572a96b1 100644 --- a/testing/test_assertion.py +++ b/testing/test_assertion.py @@ -164,7 +164,7 @@ def test_assert_compare_truncate_longmessage(testdir): result = testdir.runpytest() result.stdout.fnmatch_lines([ - "*too verbose, truncated*", + "*truncated*use*-vv*", ])