Skip to content

Commit 34c68d3

Browse files
committed
fix: restore 5.7.0b1 changelog underline; assert failure signals stay quiet
Restore the RST section underline under 5.7.0b1 that a main merge dropped. Extend the on_success-raises regression test so task_failure and task_internal_error are asserted not to fire.
1 parent 39eea36 commit 34c68d3

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

‎Changelog.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ Other
121121
.. _version-5.7.0b1:
122122

123123
5.7.0b1
124+
=======
124125

125126
:release-date: 2026-10-06
126127
:release-by: Asif Saif Uddin

‎t/unit/tasks/test_trace.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ def add_with_failing_success(x, y):
8282
return x + y
8383

8484
on_task_success = Mock()
85+
on_task_failure = Mock()
86+
on_task_internal_error = Mock()
8587
signals.task_success.connect(on_task_success)
88+
signals.task_failure.connect(on_task_failure)
89+
signals.task_internal_error.connect(on_task_internal_error)
8690
try:
8791
with patch('celery.app.trace.TraceInfo.handle_failure') as handle_failure, \
8892
patch('celery.app.trace.logger') as mock_logger:
@@ -91,6 +95,8 @@ def add_with_failing_success(x, y):
9195
)
9296
finally:
9397
signals.task_success.receivers[:] = []
98+
signals.task_failure.receivers[:] = []
99+
signals.task_internal_error.receivers[:] = []
94100

95101
assert info is None
96102
assert retval == 4
@@ -100,6 +106,8 @@ def add_with_failing_success(x, y):
100106
assert add_with_failing_success.backend.get_state('id-1') == states.SUCCESS
101107
handle_failure.assert_not_called()
102108
on_task_success.assert_called()
109+
on_task_failure.assert_not_called()
110+
on_task_internal_error.assert_not_called()
103111
add_with_failing_success.after_return.assert_called_with(
104112
states.SUCCESS, 4, 'id-1', (2, 2), {}, None,
105113
)

0 commit comments

Comments
 (0)