Factory fixture to configure worker count and round-robin mode.
(monkeypatch, clean_manager)
| 144 | |
| 145 | @pytest.fixture |
| 146 | def configure_workers(monkeypatch, clean_manager): |
| 147 | """Factory fixture to configure worker count and round-robin mode.""" |
| 148 | |
| 149 | def _configure(num_workers: int = 1, round_robin: bool = False): |
| 150 | monkeypatch.setattr(queue_config, "NUM_WORKERS", num_workers) |
| 151 | monkeypatch.setattr(queue_config, "ROUND_ROBIN", round_robin) |
| 152 | return clean_manager |
| 153 | |
| 154 | return _configure |
| 155 | |
| 156 | |
| 157 | # ============================================================================ |
no outgoing calls
no test coverage detected