QuietReporter   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
dl 0
loc 8
rs 10
1
"""Unit tests configuration file."""
2
3
4
def pytest_configure(config):
5
    """Disable verbose output when running tests."""
6
    terminal = config.pluginmanager.getplugin('terminal')
7
    base = terminal.TerminalReporter
8
9
    class QuietReporter(base):
10
        """A py.test reporting that only shows dots when running tests."""
11
12
        def __init__(self, *args, **kwargs):
13
            super().__init__(*args, **kwargs)
14
            self.verbosity = 0
15
            self.showlongtestinfo = False
16
            self.showfspath = False
17
18
    terminal.TerminalReporter = QuietReporter
19