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

Method test_flag_clobber

tests/config/test_application.py:421–431  ·  view source on GitHub ↗

test that setting flags doesn't clobber existing settings

(self)

Source from the content-addressed store, hash-verified

419 # assert "Unrecognized alias: unrecognized" in stderr
420
421 def test_flag_clobber(self):
422 """test that setting flags doesn't clobber existing settings"""
423 app = MyApp()
424 app.parse_command_line(["--Bar.b=5", "--disable"])
425 app.init_bar()
426 self.assertEqual(app.bar.enabled, False)
427 self.assertEqual(app.bar.b, 5)
428 app.parse_command_line(["--enable", "--Bar.b=10"])
429 app.init_bar()
430 self.assertEqual(app.bar.enabled, True)
431 self.assertEqual(app.bar.b, 10)
432
433 def test_warn_autocorrect(self):
434 stream = StringIO()

Callers

nothing calls this directly

Calls 3

init_barMethod · 0.95
parse_command_lineMethod · 0.80
MyAppClass · 0.70

Tested by

no test coverage detected