def test_alias_args_error():
 _ip.alias_manager.define_alias('parts', 'echo first %s second %s')
 with capture_output() as cap:
  _ip.run_cell('parts 1')
 nt.assert_equal(cap.stderr.split(':')[0], 'UsageError')

def test_alias_args_error ( ) : _ip . alias_manager . define_alias ( 'parts' , 'echo first %s second %s' ) with capture_output ( ) as cap : _ip . run_cell ( 'parts 1' ) nt . assert_equal ( cap . stderr . split ( ':' ) [ 0 ] , 'UsageError' )
error expanding with wrong number of arguments .