def METHOD_NAME () :
    """ Test pty_shell which runs command successfully """
    conf  = config()
    shell = sups.PTYShell (saga.Url(conf.job_service_url), conf.session)
    txt = "______1______2_____3_____\n"
    shell.run_async ("cat <<EOT")
    shell.send (txt)
    shell.send ('EOT\n')
    ret, out = shell.find_prompt ()
    assert (ret == 0)   , "%s"       % (repr(ret))
    assert (out == txt) , "%s == %s" % (repr(out), repr(txt))
    assert (shell.alive ())
    shell.finalize (True)
    assert (not shell.alive ())