Cleanup multiprocessing resources when multiprocessing tests completed.
()
| 536 | |
| 537 | |
| 538 | def _cleanup_tests(): |
| 539 | """Cleanup multiprocessing resources when multiprocessing tests |
| 540 | completed.""" |
| 541 | |
| 542 | from test import support |
| 543 | |
| 544 | # cleanup multiprocessing |
| 545 | process._cleanup() |
| 546 | |
| 547 | # Stop the ForkServer process if it's running |
| 548 | from multiprocessing import forkserver |
| 549 | forkserver._forkserver._stop() |
| 550 | |
| 551 | # Stop the ResourceTracker process if it's running |
| 552 | from multiprocessing import resource_tracker |
| 553 | resource_tracker._resource_tracker._stop() |
| 554 | |
| 555 | # bpo-37421: Explicitly call _run_finalizers() to remove immediately |
| 556 | # temporary directories created by multiprocessing.util.get_temp_dir(). |
| 557 | _run_finalizers() |
| 558 | support.gc_collect() |
| 559 | |
| 560 | support.reap_children() |
nothing calls this directly
no test coverage detected
searching dependent graphs…