Changes in tests/test.py [2cd949b:8364209]
- File:
-
- 1 edited
-
tests/test.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/test.py
r2cd949b r8364209 10 10 import tempfile 11 11 import time 12 13 import os14 import psutil15 import signal16 12 17 13 ################################################################################ … … 225 221 make('clean', output_file=subprocess.DEVNULL, error=subprocess.DEVNULL) 226 222 227 # since python prints stacks by default on a interrupt, redo the interrupt handling to be silent228 def worker_init():229 def sig_int(signal_num, frame):230 pass231 232 signal.signal(signal.SIGINT, sig_int)233 234 223 # create the executor for our jobs and handle the signal properly 235 pool = multiprocessing.Pool(jobs , worker_init)224 pool = multiprocessing.Pool(jobs) 236 225 237 226 failed = False 238 239 def stop(x, y):240 print("Tests interrupted by user", file=sys.stderr)241 sys.exit(1)242 signal.signal(signal.SIGINT, stop)243 227 244 228 # for each test to run
Note:
See TracChangeset
for help on using the changeset viewer.