def test_execute_with_pty(self): execute = Execute('python3 ./helpers/listprint.py 5 test test2', shell=True, use_pty=True) t = Thread(target=execute.run) t.start() sleep(0.3) self.assertTrue(execute.output())
def test_execute_without_pty(self): execute = Execute(['echo', 'helpers']) execute.run() self.assertTrue('helpers' in str(execute.output()))