From da5882c2d5607174128f4618020a1ff26adc8316 Mon Sep 17 00:00:00 2001 From: feuillemorte Date: Fri, 9 Feb 2018 21:36:48 +0300 Subject: [PATCH] #1478 Add doc and remove print --- _pytest/terminal.py | 1 - doc/en/capture.rst | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_pytest/terminal.py b/_pytest/terminal.py index a75fce4c7..257fa87f1 100644 --- a/_pytest/terminal.py +++ b/_pytest/terminal.py @@ -630,7 +630,6 @@ class TerminalReporter: if self.config.option.showcapture == 'no': return for secname, content in rep.sections: - print(self.config.option.showcapture) if self.config.option.showcapture != 'both': if not (self.config.option.showcapture in secname): continue diff --git a/doc/en/capture.rst b/doc/en/capture.rst index 3315065c5..901def602 100644 --- a/doc/en/capture.rst +++ b/doc/en/capture.rst @@ -9,7 +9,8 @@ Default stdout/stderr/stdin capturing behaviour During test execution any output sent to ``stdout`` and ``stderr`` is captured. If a test or a setup method fails its according captured -output will usually be shown along with the failure traceback. +output will usually be shown along with the failure traceback. (this +behavior can be configured by the ``--show-capture`` command-line option). In addition, ``stdin`` is set to a "null" object which will fail on attempts to read from it because it is rarely desired