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

Method test_config_propagation

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

Source from the content-addressed store, hash-verified

230 self.assertEqual(app.bar.bdict, bdict)
231
232 def test_config_propagation(self):
233 app = MyApp()
234 app.parse_command_line(["--i=10", "--Foo.j=10", "--enable=False", "--log-level=50"])
235 app.init_foo()
236 app.init_bar()
237 self.assertEqual(app.foo.i, 10)
238 self.assertEqual(app.foo.j, 10)
239 self.assertEqual(app.bar.enabled, False)
240
241 def test_cli_priority(self):
242 """Test that loading config files does not override CLI options"""

Callers

nothing calls this directly

Calls 4

init_fooMethod · 0.95
init_barMethod · 0.95
parse_command_lineMethod · 0.80
MyAppClass · 0.70

Tested by

no test coverage detected