Author: Brian Kearns <bdkea...@gmail.com> Branch: Changeset: r73158:1d79593ea750 Date: 2014-08-29 03:35 -0400 http://bitbucket.org/pypy/pypy/changeset/1d79593ea750/
Log: merge heads diff --git a/pypy/test_all.py b/pypy/test_all.py --- a/pypy/test_all.py +++ b/pypy/test_all.py @@ -27,4 +27,21 @@ sys.path.insert(0,os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) import pytest import pytest_cov + if sys.platform == 'win32': + #Try to avoid opeing a dialog box if one of the tests causes a system error + # We do this in runner.py, but buildbots run twisted which ruins inheritance + # in windows subprocesses. + import ctypes + winapi = ctypes.windll.kernel32 + SetErrorMode = winapi.SetErrorMode + SetErrorMode.argtypes=[ctypes.c_int] + + SEM_FAILCRITICALERRORS = 1 + SEM_NOGPFAULTERRORBOX = 2 + SEM_NOOPENFILEERRORBOX = 0x8000 + flags = SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX + #Since there is no GetErrorMode, do a double Set + old_mode = SetErrorMode(flags) + SetErrorMode(old_mode | flags) + sys.exit(pytest.main(plugins=[pytest_cov])) diff --git a/testrunner/runner.py b/testrunner/runner.py --- a/testrunner/runner.py +++ b/testrunner/runner.py @@ -407,7 +407,8 @@ run_param.dry_run = opts.dry_run if run_param.dry_run: - print >>out, run_param.__dict__ + print >>out, '\n'.join([str((k, getattr(run_param, k))) \ + for k in dir(run_param) if k[:2] != '__']) res = execute_tests(run_param, testdirs, logfile, out) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit