(self, config=config1)
| 3352 | self.assert_log_lines([]) |
| 3353 | |
| 3354 | def test_config1_ok(self, config=config1): |
| 3355 | # A config defining a sub-parser as well. |
| 3356 | with support.captured_stdout() as output: |
| 3357 | self.apply_config(config) |
| 3358 | logger = logging.getLogger("compiler.parser") |
| 3359 | # Both will output a message |
| 3360 | logger.info(self.next_message()) |
| 3361 | logger.error(self.next_message()) |
| 3362 | self.assert_log_lines([ |
| 3363 | ('INFO', '1'), |
| 3364 | ('ERROR', '2'), |
| 3365 | ], stream=output) |
| 3366 | # Original logger output is empty. |
| 3367 | self.assert_log_lines([]) |
| 3368 | |
| 3369 | def test_config2_failure(self): |
| 3370 | # A simple config which overrides the default settings. |
no test coverage detected