(self)
| 1726 | self.addCleanup(closeFileHandler, handler, fn) |
| 1727 | |
| 1728 | def test_config9_ok(self): |
| 1729 | self.apply_config(self.config9) |
| 1730 | formatter = logging.root.handlers[0].formatter |
| 1731 | result = formatter.format(logging.makeLogRecord({'msg': 'test'})) |
| 1732 | self.assertEqual(result, 'test ++ defaultvalue') |
| 1733 | result = formatter.format(logging.makeLogRecord( |
| 1734 | {'msg': 'test', 'customfield': "customvalue"})) |
| 1735 | self.assertEqual(result, 'test ++ customvalue') |
| 1736 | |
| 1737 | |
| 1738 | def test_logger_disabling(self): |
nothing calls this directly
no test coverage detected