Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot be used with pytest #22

Open
raczben opened this issue Dec 10, 2019 · 1 comment
Open

Cannot be used with pytest #22

raczben opened this issue Dec 10, 2019 · 1 comment

Comments

@raczben
Copy link
Owner

raczben commented Dec 10, 2019

Describe the bug
Wexpect cannot be used in project which uses pytest

To Reproduce

import wexpect

def test_wexpect():
    executable = 'tclsh'
    prompt = '% '

    child_proc = wexpect.spawn(executable)
    child_proc.expect(prompt, timeout=3)

    child_proc.terminate()

Run this script in pytest.

Expected behavior
Pytest should print the results. Wexpect eat the console.

Environment:

  • OS Name Microsoft Windows 10 Pro
  • Version 10.0.18363 Build 18363
  • Python 3.7.4
  • 3.0.0
@raczben
Copy link
Owner Author

raczben commented Dec 10, 2019

Here is a workaround:

Disable all STDIO capturing with -s

pytest -s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant