This repository was archived by the owner on Aug 2, 2019. It is now read-only.
File tree 2 files changed +19
-1
lines changed
2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 27
27
sys .path .insert (0 ,os .path .dirname (os .path .dirname (os .path .realpath (__file__ ))))
28
28
import pytest
29
29
import pytest_cov
30
+ if sys .platform == 'win32' :
31
+ #Try to avoid opeing a dialog box if one of the tests causes a system error
32
+ # We do this in runner.py, but buildbots run twisted which ruins inheritance
33
+ # in windows subprocesses.
34
+ import ctypes
35
+ winapi = ctypes .windll .kernel32
36
+ SetErrorMode = winapi .SetErrorMode
37
+ SetErrorMode .argtypes = [ctypes .c_int ]
38
+
39
+ SEM_FAILCRITICALERRORS = 1
40
+ SEM_NOGPFAULTERRORBOX = 2
41
+ SEM_NOOPENFILEERRORBOX = 0x8000
42
+ flags = SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX
43
+ #Since there is no GetErrorMode, do a double Set
44
+ old_mode = SetErrorMode (flags )
45
+ SetErrorMode (old_mode | flags )
46
+
30
47
sys .exit (pytest .main (plugins = [pytest_cov ]))
Original file line number Diff line number Diff line change @@ -407,7 +407,8 @@ def main(args):
407
407
run_param .dry_run = opts .dry_run
408
408
409
409
if run_param .dry_run :
410
- print >> out , run_param .__dict__
410
+ print >> out , '\n ' .join ([str ((k , getattr (run_param , k ))) \
411
+ for k in dir (run_param ) if k [:2 ] != '__' ])
411
412
412
413
res = execute_tests (run_param , testdirs , logfile , out )
413
414
You can’t perform that action at this time.
0 commit comments