()
| 14 | |
| 15 | @pytest.fixture(autouse=True) |
| 16 | def reset_command_params_between_each_test(): |
| 17 | with contextlib.ExitStack() as stack: |
| 18 | for command in celery.commands.values(): |
| 19 | # We only need shallow copy -- preload options are appended to the list, |
| 20 | # existing options are kept as-is |
| 21 | params_copy = command.params[:] |
| 22 | patch_instance = patch.object(command, "params", params_copy) |
| 23 | stack.enter_context(patch_instance) |
| 24 | |
| 25 | yield |
| 26 | |
| 27 | |
| 28 | @pytest.mark.parametrize( |