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

Method test_aliases_multiple

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

Source from the content-addressed store, hash-verified

365 self.assertEqual(app.foo.j, 10)
366
367 def test_aliases_multiple(self):
368 # Test multiple > 2 aliases for the same argument
369 class TestMultiAliasApp(Application):
370 foo = Integer(config=True)
371 aliases = {("f", "bar", "qux"): "TestMultiAliasApp.foo"}
372
373 app = TestMultiAliasApp()
374 app.parse_command_line(["-f", "3"])
375 self.assertEqual(app.foo, 3)
376
377 app = TestMultiAliasApp()
378 app.parse_command_line(["--bar", "4"])
379 self.assertEqual(app.foo, 4)
380
381 app = TestMultiAliasApp()
382 app.parse_command_line(["--qux", "5"])
383 self.assertEqual(app.foo, 5)
384
385 def test_aliases_help_msg(self):
386 app = MyApp()

Callers

nothing calls this directly

Calls 2

TestMultiAliasAppClass · 0.85
parse_command_lineMethod · 0.80

Tested by

no test coverage detected