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

pytest-embedded-wokwi doesn't work in Windows (RDT-859) #303

Closed
urish opened this issue Aug 18, 2024 · 3 comments · Fixed by #304
Closed

pytest-embedded-wokwi doesn't work in Windows (RDT-859) #303

urish opened this issue Aug 18, 2024 · 3 comments · Fixed by #304
Labels
bug Something isn't working

Comments

@urish
Copy link
Contributor

urish commented Aug 18, 2024

Following 1383c2e, the plugin no longer works on windows, since the code uses pexpect.spawn, which is not available on Windows.

When using pytest-embedded-wokwi on windows, you get the following error:

C:\dev\esp\tools\python_env\idf5.4_py3.12_env\Lib\site-packages\pytest_embedded\plugin.py:490: in wrapper
    res = func(*args, **kwargs)
C:\dev\esp\tools\python_env\idf5.4_py3.12_env\Lib\site-packages\pytest_embedded\plugin.py:1139: in wokwi
    return wokwi_gn(**locals())
C:\dev\esp\tools\python_env\idf5.4_py3.12_env\Lib\site-packages\pytest_embedded\dut_factory.py:475: in wokwi_gn   
    return cls(**_drop_none_kwargs(kwargs))
C:\dev\esp\tools\python_env\idf5.4_py3.12_env\Lib\site-packages\pytest_embedded_wokwi\wokwi_cli.py:62: in __init__
    child = pexpect.spawn('wokwi-cli --help')
E   AttributeError: module 'pexpect' has no attribute 'spawn'
@urish urish added the bug Something isn't working label Aug 18, 2024
@github-actions github-actions bot changed the title pytest-embedded-wokwi doesn't work in Windows pytest-embedded-wokwi doesn't work in Windows (RDT-859) Aug 18, 2024
@urish
Copy link
Contributor Author

urish commented Aug 18, 2024

For anyone else coming across this issue: right now, the workaround is to use an older version on Windows, e.g. version 1.10.3:

pip install pytest_embedded_wokwi==1.10.3

@hfudev
Copy link
Member

hfudev commented Aug 19, 2024

@urish thanks for reporting. Please have another try on the latest version 1.11.5.

@urish
Copy link
Contributor Author

urish commented Aug 19, 2024

Works great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants