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

Method test_flags_help_msg

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

Source from the content-addressed store, hash-verified

332 self.assertEqual(app.bar.enabled, True)
333
334 def test_flags_help_msg(self):
335 app = MyApp()
336 stdout = io.StringIO()
337 with contextlib.redirect_stdout(stdout):
338 app.print_flag_help()
339 hmsg = stdout.getvalue()
340 self.assertRegex(hmsg, "(?<!-)-e, --enable\\b")
341 self.assertRegex(hmsg, "(?<!-)-d, --disable\\b")
342 self.assertIn("Equivalent to: [--Bar.enabled=True]", hmsg)
343 self.assertIn("Equivalent to: [--Bar.enabled=False]", hmsg)
344
345 def test_aliases(self):
346 app = MyApp()

Callers

nothing calls this directly

Calls 2

print_flag_helpMethod · 0.80
MyAppClass · 0.70

Tested by

no test coverage detected