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

Function test_alias_args_error

IPython/core/tests/test_alias.py:34–41  ·  view source on GitHub ↗

Error expanding with wrong number of arguments

()

Source from the content-addressed store, hash-verified

32
33
34def test_alias_args_error():
35 """Error expanding with wrong number of arguments"""
36 _ip.alias_manager.define_alias('parts', 'echo first %s second %s')
37 # capture stderr:
38 with capture_output() as cap:
39 _ip.run_cell('parts 1')
40
41 nt.assert_equal(cap.stderr.split(':')[0], 'UsageError')
42
43def test_alias_args_commented():
44 """Check that alias correctly ignores 'commented out' args"""

Callers

nothing calls this directly

Calls 3

capture_outputClass · 0.90
define_aliasMethod · 0.80
run_cellMethod · 0.45

Tested by

no test coverage detected