test.py use pexpect instead