MCPcopy Create free account
hub / github.com/ipython/ipython / test_alias_args_commented_nargs

Function test_alias_args_commented_nargs

IPython/core/tests/test_alias.py:55–65  ·  view source on GitHub ↗

Check that alias correctly counts args, excluding those commented out

()

Source from the content-addressed store, hash-verified

53 assert cap.stdout.strip() == 'this is %s a commented out arg'
54
55def test_alias_args_commented_nargs():
56 """Check that alias correctly counts args, excluding those commented out"""
57 am = _ip.alias_manager
58 alias_name = 'comargcount'
59 cmd = 'echo this is %%s a commented out arg and this is not %s'
60
61 am.define_alias(alias_name, cmd)
62 assert am.is_alias(alias_name)
63
64 thealias = am.get_alias(alias_name)
65 nt.assert_equal(thealias.nargs, 1)

Callers

nothing calls this directly

Calls 3

define_aliasMethod · 0.80
is_aliasMethod · 0.80
get_aliasMethod · 0.80

Tested by

no test coverage detected