MCPcopy Create free account
hub / github.com/ipython/traitlets / test_log

Method test_log

tests/config/test_application.py:108–117  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

106
107class TestApplication(TestCase):
108 def test_log(self):
109 stream = StringIO()
110 app = MyApp(log_level=logging.INFO)
111 handler = logging.StreamHandler(stream)
112 # trigger reconstruction of the log formatter
113 app.log_format = "%(message)s"
114 app.log_datefmt = "%Y-%m-%d %H:%M"
115 app.log.handlers = [handler]
116 app.log.info("hello")
117 assert "hello" in stream.getvalue()
118
119 def test_no_eval_cli_text(self):
120 app = MyApp()

Callers

nothing calls this directly

Calls 2

MyAppClass · 0.70
infoMethod · 0.45

Tested by

no test coverage detected