(self, config=config1)
| 3295 | self.assert_log_lines([]) |
| 3296 | |
| 3297 | def test_config1_ok(self, config=config1): |
| 3298 | # A config defining a sub-parser as well. |
| 3299 | with support.captured_stdout() as output: |
| 3300 | self.apply_config(config) |
| 3301 | logger = logging.getLogger("compiler.parser") |
| 3302 | # Both will output a message |
| 3303 | logger.info(self.next_message()) |
| 3304 | logger.error(self.next_message()) |
| 3305 | self.assert_log_lines([ |
| 3306 | ('INFO', '1'), |
| 3307 | ('ERROR', '2'), |
| 3308 | ], stream=output) |
| 3309 | # Original logger output is empty. |
| 3310 | self.assert_log_lines([]) |
| 3311 | |
| 3312 | def test_config2_failure(self): |
| 3313 | # A simple config which overrides the default settings. |
no test coverage detected