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

Method test_update_self

tests/config/test_configurable.py:578–586  ·  view source on GitHub ↗

update_config with same config object still triggers config_changed

(self)

Source from the content-addressed store, hash-verified

576 self.assertEqual(m.a, 15)
577
578 def test_update_self(self):
579 """update_config with same config object still triggers config_changed"""
580 c = Config()
581 c.MyConfigurable.a = 5
582 m = MyConfigurable(config=c)
583 self.assertEqual(m.a, 5)
584 c.MyConfigurable.a = 10
585 m.update_config(c)
586 self.assertEqual(m.a, 10)
587
588 def test_config_default(self):
589 class SomeSingleton(SingletonConfigurable):

Callers

nothing calls this directly

Calls 3

ConfigClass · 0.90
MyConfigurableClass · 0.85
update_configMethod · 0.80

Tested by

no test coverage detected