1 Adjust for recent pytest
2 --- pytest-benchmark-3.1.1/src/pytest_benchmark/logger.py.orig 2017-07-26 13:48:12.000000000 +0200
3 +++ pytest-benchmark-3.1.1/src/pytest_benchmark/logger.py 2018-08-03 07:41:12.218113772 +0200
5 def warn(self, code, text, warner=None, suspend=False, fslocation=None):
7 if suspend and self.capman:
8 - self.capman.suspendcapture(in_=True)
9 + self.capman.suspend_global_capture(in_=True)
11 self.term.sep("-", red=True, bold=True)
12 self.term.write(" WARNING: ", red=True, bold=True)
13 self.term.line(text, red=True)
14 self.term.sep("-", red=True, bold=True)
15 if suspend and self.capman:
16 - self.capman.resumecapture()
17 + self.capman.resume_global_capture()
19 warner = self.pytest_warn
20 if fslocation and self.pytest_warn_has_fslocation:
22 def debug(self, text, **kwargs):
25 - self.capman.suspendcapture(in_=True)
26 + self.capman.suspend_global_capture(in_=True)
27 self.info(text, **kwargs)
29 - self.capman.resumecapture()
30 + self.capman.resume_global_capture()