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

Method test_flags

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

Source from the content-addressed store, hash-verified

311 assert app.opt is None
312
313 def test_flags(self):
314 app = MyApp()
315 app.parse_command_line(["--disable"])
316 app.init_bar()
317 self.assertEqual(app.bar.enabled, False)
318
319 app = MyApp()
320 app.parse_command_line(["-d"])
321 app.init_bar()
322 self.assertEqual(app.bar.enabled, False)
323
324 app = MyApp()
325 app.parse_command_line(["--enable"])
326 app.init_bar()
327 self.assertEqual(app.bar.enabled, True)
328
329 app = MyApp()
330 app.parse_command_line(["-e"])
331 app.init_bar()
332 self.assertEqual(app.bar.enabled, True)
333
334 def test_flags_help_msg(self):
335 app = MyApp()

Callers

nothing calls this directly

Calls 3

init_barMethod · 0.95
parse_command_lineMethod · 0.80
MyAppClass · 0.70

Tested by

no test coverage detected