(self)
| 73 | return logging.FileHandler(filename) |
| 74 | |
| 75 | def get_output(self): |
| 76 | with open(self.filename, "rb") as f: |
| 77 | line = f.read().strip() |
| 78 | m = LogFormatterTest.LINE_RE.match(line) |
| 79 | if m: |
| 80 | return m.group(1) |
| 81 | else: |
| 82 | raise Exception("output didn't match regex: %r" % line) |
| 83 | |
| 84 | def test_basic_logging(self): |
| 85 | self.logger.error("foo") |
no test coverage detected