For testing only: Use threading under the hood instead of multiprocessing to make coverage work.
()
| 17 | |
| 18 | |
| 19 | def setup_testing(): |
| 20 | """For testing only: Use threading under the hood instead of multiprocessing |
| 21 | to make coverage work. |
| 22 | """ |
| 23 | global Queue |
| 24 | global Process |
| 25 | del Queue |
| 26 | del Process |
| 27 | from queue import Queue |
| 28 | from threading import Thread as Process |
| 29 | # Monkeypatch os.kill and add fake pid property on Thread. |
| 30 | os.kill = lambda *args: None |
| 31 | Process.pid = property(lambda self: None) |
| 32 | |
| 33 | |
| 34 | class AbortException(Exception): |
nothing calls this directly
no test coverage detected
searching dependent graphs…