Test setting the handler's stream
(self)
| 851 | logging.raiseExceptions = old_raise |
| 852 | |
| 853 | def test_stream_setting(self): |
| 854 | """ |
| 855 | Test setting the handler's stream |
| 856 | """ |
| 857 | h = logging.StreamHandler() |
| 858 | stream = io.StringIO() |
| 859 | old = h.setStream(stream) |
| 860 | self.assertIs(old, sys.stderr) |
| 861 | actual = h.setStream(old) |
| 862 | self.assertIs(actual, stream) |
| 863 | # test that setting to existing value returns None |
| 864 | actual = h.setStream(old) |
| 865 | self.assertIsNone(actual) |
| 866 | |
| 867 | def test_can_represent_stream_with_int_name(self): |
| 868 | h = logging.StreamHandler(StreamWithIntName()) |
nothing calls this directly
no test coverage detected