pytest - Windows fatal exception: code 0x8001010d

13

I am trying to run a GUI test using pytest and pywinauto. When I run the code normally, it does not complain.

However, when I am doing it via pytest, it throws a bunch of errors:

Windows fatal exception: code 0x8001010d

Note that the code still executes without problems and the cases are marked as passed. It is just that the output is polluted with these weird Windows exceptions.

What is the reason for this. Should I be concerned?

def test_01():
    app = Application(backend='uia')
    app.start(PATH_TO_MY_APP)
    main = app.window(title_re="MY_APP")
    main.wait('visible', timeout=8) # error occurs here
    time.sleep(0.5)
    win_title = f"MY_APP - New Project"
    assert win_title.upper() == main.texts()[0].upper() # error occurs here
python
pytest
pywinauto
asked on Stack Overflow Aug 16, 2019 by Joe • edited Aug 16, 2019 by Martin Evans

3 Answers

4

I had the same problem with Python 3.7.7 32-bit and pytest 5.x.x. It was solved by downgrading pytest to v.4.0.0:

python -m pip install pytest==4.0

Perhaps all Python versions are not compatible with the newest pytest version(s).

answered on Stack Overflow Mar 22, 2020 by np8
0

My workaround for now is to install pytest==4.6.11 With 5.0.0 the problem occurs the first time.

answered on Stack Overflow Jul 6, 2020 by Michel Lawaty • edited Jul 6, 2020 by Yunnosch
0

This is an effect of a change introduced with pytest 5.0.0. From the release notes:

#5440: The faulthandler standard library module is now enabled by default to help users diagnose crashes in C modules.

This functionality was provided by integrating the external pytest-faulthandler plugin into the core, so users should remove that plugin from their requirements if used.

For more information see the docs: https://docs.pytest.org/en/stable/usage.html#fault-handler

You can mute these errors as follows:

pytest -p no:faulthandler
answered on Stack Overflow Jan 21, 2021 by Felix Zumstein

User contributions licensed under CC BY-SA 3.0