Merge pull request #3263 from feuillemorte/3203-remove-statistic-indicator
#3203 Remove progress when no-capture
This commit is contained in:
commit
20085542e2
|
@ -324,6 +324,8 @@ class TerminalReporter(object):
|
||||||
_PROGRESS_LENGTH = len(' [100%]')
|
_PROGRESS_LENGTH = len(' [100%]')
|
||||||
|
|
||||||
def _get_progress_information_message(self):
|
def _get_progress_information_message(self):
|
||||||
|
if self.config.getoption('capture') == 'no':
|
||||||
|
return ''
|
||||||
collected = self._session.testscollected
|
collected = self._session.testscollected
|
||||||
if collected:
|
if collected:
|
||||||
progress = len(self._progress_nodeids_reported) * 100 // collected
|
progress = len(self._progress_nodeids_reported) * 100 // collected
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Removed progress information when capture option is ``no``.
|
|
@ -1046,6 +1046,9 @@ class TestProgress(object):
|
||||||
r'test_foobar.py \.{5}',
|
r'test_foobar.py \.{5}',
|
||||||
])
|
])
|
||||||
|
|
||||||
|
output = testdir.runpytest('--capture=no')
|
||||||
|
assert "%]" not in output.stdout.str()
|
||||||
|
|
||||||
|
|
||||||
class TestProgressWithTeardown(object):
|
class TestProgressWithTeardown(object):
|
||||||
"""Ensure we show the correct percentages for tests that fail during teardown (#3088)"""
|
"""Ensure we show the correct percentages for tests that fail during teardown (#3088)"""
|
||||||
|
|
Loading…
Reference in New Issue