Skip to content

Commit

Permalink
Update to python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
awmackowiak committed Nov 22, 2023
1 parent ce4580d commit 1e2cf86
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Binary file added statefilename
Binary file not shown.
8 changes: 5 additions & 3 deletions t/unit/tasks/test_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,10 +391,12 @@ def test_ready(self):

def test_del(self):
with patch('celery.result.AsyncResult.backend') as backend:
result = self.app.AsyncResult(self.task1['id'])
result = self.app.AsyncResult(self.task1['id'], backend=backend)
result_clone = copy.copy(result)
del result
assert backend.remove_pending_result.called_once_with(
# del result do not exacly call __del__ method. The gc does.
# https://docs.python.org/3/reference/datamodel.html#object.__del__
result.__del__()
backend.remove_pending_result.assert_called_once_with(
result_clone
)

Expand Down

0 comments on commit 1e2cf86

Please sign in to comment.