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

Method test_merge_multi_lazyII

tests/config/test_loader.py:647–663  ·  view source on GitHub ↗

With multiple config files (systemwide and users), we want compounding. If both are lazy we still want a lazy config.

(self)

Source from the content-addressed store, hash-verified

645 self.assertEqual(c.Foo.trait, [1, 2])
646
647 def test_merge_multi_lazyII(self):
648 """
649 With multiple config files (systemwide and users), we want compounding.
650
651 If both are lazy we still want a lazy config.
652 """
653 c1 = Config()
654 c2 = Config()
655
656 c1.Foo.trait.append(1)
657 c2.Foo.trait.append(2)
658
659 c = Config()
660 c.merge(c1)
661 c.merge(c2)
662
663 self.assertEqual(c.Foo.trait._extend, [1, 2])
664
665 def test_merge_multi_lazy_III(self):
666 """

Callers

nothing calls this directly

Calls 3

mergeMethod · 0.95
ConfigClass · 0.90
appendMethod · 0.80

Tested by

no test coverage detected