| 127 | |
| 128 | @pytest.fixture(autouse=True, scope='session') |
| 129 | def AAA_disable_multiprocessing(): |
| 130 | # pytest-cov breaks if a multiprocessing.Process is started, |
| 131 | # so disable them completely to make sure it doesn't happen. |
| 132 | stuff = [ |
| 133 | 'multiprocessing.Process', |
| 134 | 'billiard.Process', |
| 135 | 'billiard.context.Process', |
| 136 | 'billiard.process.Process', |
| 137 | 'billiard.process.BaseProcess', |
| 138 | 'multiprocessing.Process', |
| 139 | ] |
| 140 | ctxs = [patch(s) for s in stuff] |
| 141 | [ctx.__enter__() for ctx in ctxs] |
| 142 | |
| 143 | yield |
| 144 | |
| 145 | [ctx.__exit__(*sys.exc_info()) for ctx in ctxs] |
| 146 | |
| 147 | |
| 148 | def alive_threads(): |