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

Method test_custom

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

Source from the content-addressed store, hash-verified

117 self.assertEqual(c2.config, c3.config)
118
119 def test_custom(self):
120 config = Config()
121 config.foo = "foo"
122 config.bar = "bar"
123 c1 = Configurable(config=config)
124 c2 = Configurable(config=c1.config)
125 c3 = Configurable(config=c2.config)
126 self.assertEqual(c1.config, config)
127 self.assertEqual(c2.config, config)
128 self.assertEqual(c3.config, config)
129 # Test that copies are not made
130 self.assertTrue(c1.config is config)
131 self.assertTrue(c2.config is config)
132 self.assertTrue(c3.config is config)
133 self.assertTrue(c1.config is c2.config)
134 self.assertTrue(c2.config is c3.config)
135
136 def test_inheritance(self):
137 config = Config()

Callers

nothing calls this directly

Calls 2

ConfigClass · 0.90
ConfigurableClass · 0.90

Tested by

no test coverage detected