Test setting the handler's stream
(self)
| 838 | logging.raiseExceptions = old_raise |
| 839 | |
| 840 | def test_stream_setting(self): |
| 841 | """ |
| 842 | Test setting the handler's stream |
| 843 | """ |
| 844 | h = logging.StreamHandler() |
| 845 | stream = io.StringIO() |
| 846 | old = h.setStream(stream) |
| 847 | self.assertIs(old, sys.stderr) |
| 848 | actual = h.setStream(old) |
| 849 | self.assertIs(actual, stream) |
| 850 | # test that setting to existing value returns None |
| 851 | actual = h.setStream(old) |
| 852 | self.assertIsNone(actual) |
| 853 | |
| 854 | def test_can_represent_stream_with_int_name(self): |
| 855 | h = logging.StreamHandler(StreamWithIntName()) |
nothing calls this directly
no test coverage detected