Fix expect for python 3 (#24912)

* Fix expect for python 3

- Change generator next to python 3 compatible
- Added tests for expect

* Add pexpect to integration.txt

- add pexpect library to requirements for integration tests

* Use ansible_python_interpreter in integration tests for expect

* Use double-quotes for expect integration tests

* Cast user input to string for expect integration tests

* Cast user input to string earlier in expect integration tests

* Use ansible.module_utils.six.moves input for expect integration tests

* Fix yamllint errors in the expect test

* Use cat to trigger timeout for expect integration tests

* Use realpath filter in expect integration tests
This commit is contained in:
kkjang 2017-05-23 15:51:46 -07:00 committed by Toshio Kuratomi
parent 66355df917
commit daada2000c
6 changed files with 103 additions and 1 deletions

View file

@ -116,7 +116,7 @@ def response_closure(module, question, responses):
def wrapped(info):
try:
return resp_gen.next()
return next(resp_gen)
except StopIteration:
module.fail_json(msg="No remaining responses for '%s', "
"output was '%s'" %