@when(u'we run pgcli')
def step_run_cli(context):
 context.cli = pexpect.spawnu(u'pgcli')
 context.exit_sent = False

@ when ( u'we run pgcli' ) def step_run_cli ( context ) : context . cli = pexpect . spawnu ( u'pgcli' ) context . exit_sent = False
run the process using pexpect .