pytest_configure()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 15
rs 9.4285
cc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A QuietReporter.__init__() 0 5 1
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