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

Method test_flatten_aliases

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

Source from the content-addressed store, hash-verified

455 self.assertEqual(app.config.MyApp.log_level, logging.CRITICAL)
456
457 def test_flatten_aliases(self):
458 cfg = Config()
459 cfg.MyApp.log_level = logging.WARN
460 app = MyApp()
461 app.update_config(cfg)
462 self.assertEqual(app.log_level, logging.WARN)
463 self.assertEqual(app.config.MyApp.log_level, logging.WARN)
464 app.initialize(["--log-level", "CRITICAL"])
465 self.assertEqual(app.log_level, logging.CRITICAL)
466 # this would be app.config.Application.log_level if it failed:
467 self.assertEqual(app.config.MyApp.log_level, "CRITICAL")
468
469 def test_extra_args(self):
470 app = MyApp()

Callers

nothing calls this directly

Calls 4

initializeMethod · 0.95
ConfigClass · 0.90
update_configMethod · 0.80
MyAppClass · 0.70

Tested by

no test coverage detected