简体   繁体   中英

How to continue running pytest when python crashes?

I'm running GTK GUI tests with pytest-xdist pytest plugin via following command

C:\python.exe -m pytest --showlocals --durations=10 -n1 C:\code\tests\gui

on Windows 7 .

Python process tends to have INTERNALERROR for unknown reasons to me so I use -n1 to restart the process again with remaining tests. But there is a problem, dialog bellow pauses creation of a new process and I don't know how to close it automatically. 在此处输入图片说明

Is there a way to avoid creation of new dialogs or any other way to work around this?

So the dialog is generated by windows, so to disable it follow these steps:

  1. Start gpedit.msc
  2. Navigate to Computer Configuration -> Administrative Templates -> Windows Components -> Windows Error Reporting
  3. On right pane select Prevent display of the user interface for critical errors and set Enabled

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM