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

Method test_update_twice

tests/config/test_configurable.py:563–576  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

561 self.assertEqual(obj.d, {"a": "b", "c": "d", "e": "f"})
562
563 def test_update_twice(self):
564 c = Config()
565 c.MyConfigurable.a = 5
566 m = MyConfigurable(config=c)
567 self.assertEqual(m.a, 5)
568
569 c2 = Config()
570 c2.MyConfigurable.a = 10
571 m.update_config(c2)
572 self.assertEqual(m.a, 10)
573
574 c2.MyConfigurable.a = 15
575 m.update_config(c2)
576 self.assertEqual(m.a, 15)
577
578 def test_update_self(self):
579 """update_config with same config object still triggers config_changed"""

Callers

nothing calls this directly

Calls 3

ConfigClass · 0.90
MyConfigurableClass · 0.85
update_configMethod · 0.80

Tested by

no test coverage detected