diff options
author | holger krekel <holger@merlinux.eu> | 2013-09-27 15:48:03 +0200 |
---|---|---|
committer | holger krekel <holger@merlinux.eu> | 2013-09-27 15:48:03 +0200 |
commit | 1fc466e8ac04c19fa6e9471b315fcfe20414c067 (patch) | |
tree | 70beea8aeb563fada1d42d1c0726c60bff6abcd0 /testing/test_terminal.py | |
parent | 209a0cd5b239f5a2f9fbb2d44e1ef813b759dde5 (diff) | |
download | pytest-1fc466e8ac04c19fa6e9471b315fcfe20414c067.tar.gz |
add terminalreporter.section|line methods to print extra information.
Diffstat (limited to 'testing/test_terminal.py')
-rw-r--r-- | testing/test_terminal.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testing/test_terminal.py b/testing/test_terminal.py index 0507530a4..3a0693d97 100644 --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -699,3 +699,16 @@ def test_tbstyle_native_setup_error(testdir): result.stdout.fnmatch_lines([ '*File *test_tbstyle_native_setup_error.py", line *, in setup_error_fixture*' ]) + +def test_terminal_summary(testdir): + testdir.makeconftest(""" + def pytest_terminal_summary(terminalreporter): + w = terminalreporter + w.section("hello") + w.line("world") + """) + result = testdir.runpytest() + result.stdout.fnmatch_lines(""" + *==== hello ====* + world + """) |