]> granicus.if.org Git - python/commit
Issue #26566: Rewrite test_signal.InterProcessSignalTests
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 15 Mar 2016 10:12:35 +0000 (11:12 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 15 Mar 2016 10:12:35 +0000 (11:12 +0100)
commit32eb840a42ec0e131daac48d43aa35290e72571e
treec945dd9b538b1e9b38d851fbdd04c4804e9f21a9
parent58f2bd86fb0625912240f582f21678571e57bdde
Issue #26566: Rewrite test_signal.InterProcessSignalTests

* Add Lib/test/signalinterproctester.py
* Don't disable the garbage collector anymore
* Don't use os.fork() with a subprocess to not inherit existing signal handlers
  or threads: start from a fresh process
* Don't use UNIX kill command to send a signal but Python os.kill()
* Use a timeout of 10 seconds to wait for the signal instead of 1 second
* Always use signal.pause(), instead of time.wait(1), to wait for a signal
* Use context manager on subprocess.Popen
* remove code to retry on EINTR: it's no more needed since the PEP 475
* remove unused function exit_subprocess()
* Cleanup the code
Lib/test/signalinterproctester.py [new file with mode: 0644]
Lib/test/test_signal.py