MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_stream_setting

Method test_stream_setting

Lib/test/test_logging.py:840–852  ·  view source on GitHub ↗

Test setting the handler's stream

(self)

Source from the content-addressed store, hash-verified

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())

Callers

nothing calls this directly

Calls 3

setStreamMethod · 0.95
assertIsNoneMethod · 0.80
assertIsMethod · 0.45

Tested by

no test coverage detected