| Conditions | 1 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | """Unit tests configuration file.""" |
||
| 6 | def pytest_configure(config): |
||
| 7 | """Conigure logging and silence verbose test runner output.""" |
||
| 8 | logging.basicConfig( |
||
| 9 | level=logging.DEBUG - 1, |
||
| 10 | format="[%(levelname)-8s] (%(name)s @%(lineno)4d) %(message)s", |
||
| 11 | ) |
||
| 12 | |||
| 13 | terminal = config.pluginmanager.getplugin('terminal') |
||
| 14 | base = terminal.TerminalReporter |
||
| 15 | |||
| 16 | class QuietReporter(base): |
||
| 17 | """A py.test reporting that only shows dots when running tests.""" |
||
| 18 | |||
| 19 | def __init__(self, *args, **kwargs): |
||
| 20 | super().__init__(*args, **kwargs) |
||
| 21 | self.verbosity = 0 |
||
| 22 | self.showlongtestinfo = False |
||
| 23 | self.showfspath = False |
||
| 24 | |||
| 25 | terminal.TerminalReporter = QuietReporter |
||
| 26 |