terminal: handle "capture" option not being available

This is the case with `-p no:capture` now.
This commit is contained in:
Daniel Hahler
2019-03-20 02:27:47 +01:00
parent 415899d428
commit c7c120fba6
2 changed files with 3 additions and 3 deletions

View File

@@ -246,7 +246,7 @@ class TerminalReporter(object):
def _determine_show_progress_info(self):
"""Return True if we should display progress information based on the current config"""
# do not show progress if we are not capturing output (#3038)
if self.config.getoption("capture") == "no":
if self.config.getoption("capture", "no") == "no":
return False
# do not show progress if we are showing fixture setup/teardown
if self.config.getoption("setupshow"):
@@ -456,7 +456,7 @@ class TerminalReporter(object):
self._tw.write(msg + "\n", cyan=True)
def _get_progress_information_message(self):
if self.config.getoption("capture") == "no":
if self.config.getoption("capture", "no") == "no":
return ""
collected = self._session.testscollected
if self.config.getini("console_output_style") == "count":