(self)
| 1712 | self.addCleanup(closeFileHandler, handler, fn) |
| 1713 | |
| 1714 | def test_config9_ok(self): |
| 1715 | self.apply_config(self.config9) |
| 1716 | formatter = logging.root.handlers[0].formatter |
| 1717 | result = formatter.format(logging.makeLogRecord({'msg': 'test'})) |
| 1718 | self.assertEqual(result, 'test ++ defaultvalue') |
| 1719 | result = formatter.format(logging.makeLogRecord( |
| 1720 | {'msg': 'test', 'customfield': "customvalue"})) |
| 1721 | self.assertEqual(result, 'test ++ customvalue') |
| 1722 | |
| 1723 | |
| 1724 | def test_logger_disabling(self): |
nothing calls this directly
no test coverage detected