From f0181c35a5386561f1a9fd23f35a79ede4c2e380 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Tue, 11 Aug 2009 19:02:32 +0200 Subject: [PATCH] adding a 5 LOC plugin for capturing and ignoring the output of test function calls --HG-- branch : 1.0.x --- contrib/pytest_ignoreout.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 contrib/pytest_ignoreout.py diff --git a/contrib/pytest_ignoreout.py b/contrib/pytest_ignoreout.py new file mode 100644 index 000000000..b065593aa --- /dev/null +++ b/contrib/pytest_ignoreout.py @@ -0,0 +1,8 @@ +import py + +def pytest_runtest_call(item, __multicall__): + cap = py.io.StdCapture() + try: + return __multicall__.execute() + finally: + outerr = cap.reset()