(self)
| 3399 | self.assert_log_lines([]) |
| 3400 | |
| 3401 | def test_config4a_ok(self): |
| 3402 | # A config specifying a custom formatter class. |
| 3403 | with support.captured_stdout() as output: |
| 3404 | self.apply_config(self.config4a) |
| 3405 | #logger = logging.getLogger() |
| 3406 | try: |
| 3407 | raise RuntimeError() |
| 3408 | except RuntimeError: |
| 3409 | logging.exception("just testing") |
| 3410 | sys.stdout.seek(0) |
| 3411 | self.assertEqual(output.getvalue(), |
| 3412 | "ERROR:root:just testing\nGot a [RuntimeError]\n") |
| 3413 | # Original logger output is empty |
| 3414 | self.assert_log_lines([]) |
| 3415 | |
| 3416 | def test_config5_ok(self): |
| 3417 | self.test_config1_ok(config=self.config5) |
nothing calls this directly
no test coverage detected