Merge pull request #1314 from The-Compiler/ci-verbose

Always show full comparison output if on CI.
This commit is contained in:
Ronny Pfannschmidt
2016-01-11 10:05:15 +01:00
3 changed files with 24 additions and 3 deletions

View File

@@ -405,7 +405,7 @@ def test_sequence_comparison_uses_repr(testdir):
])
def test_assert_compare_truncate_longmessage(testdir):
def test_assert_compare_truncate_longmessage(monkeypatch, testdir):
testdir.makepyfile(r"""
def test_long():
a = list(range(200))
@@ -414,6 +414,7 @@ def test_assert_compare_truncate_longmessage(testdir):
b = '\n'.join(map(str, b))
assert a == b
""")
monkeypatch.delenv('CI', raising=False)
result = testdir.runpytest()
# without -vv, truncate the message showing a few diff lines only
@@ -431,6 +432,12 @@ def test_assert_compare_truncate_longmessage(testdir):
"*- 197",
])
monkeypatch.setenv('CI', '1')
result = testdir.runpytest()
result.stdout.fnmatch_lines([
"*- 197",
])
def test_assertrepr_loaded_per_dir(testdir):
testdir.makepyfile(test_base=['def test_base(): assert 1 == 2'])