Unfortunately, there are no configuration or command line flags for this, since this one is hardcoded deep inside pytest : when you define --verbose , you will get the whole package. However, I managed to come up with this hacker hack. Put the following function in your conftest.py :
def pytest_configure(config): terminal = config.pluginmanager.getplugin('terminal') BaseReporter = terminal.TerminalReporter class QuietReporter(BaseReporter): def __init__(self, *args, **kwargs): BaseReporter.__init__(self, *args, **kwargs) self.verbosity = 0 self.showlongtestinfo = self.showfspath = False terminal.TerminalReporter = QuietReporter
This is essentially a monkey fix relying on pytest internals, not guaranteed compatibility with future versions, and ugly as a sin. You can also make this correction based on a different user configuration of the command line argument.
source share