Conversation
Observers should not be shared across different instances. Aside from unwanted behavior, this can lead to object leaks (like celery app objects not being garbage collected).
for more information, see https://pre-commit.ci
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #8305 +/- ##
==========================================
- Coverage 87.16% 87.15% -0.01%
==========================================
Files 148 148
Lines 18469 18469
Branches 3097 3148 +51
==========================================
- Hits 16098 16097 -1
- Misses 2092 2094 +2
+ Partials 279 278 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
| callback = Mock() | ||
| a.bind_to(callback) | ||
| b.update(x=1) | ||
| callback.assert_not_called() |
There was a problem hiding this comment.
can we lean to pytest like syntax?
There was a problem hiding this comment.
is there an alternative to assert_not_called and assert_called_once_with in pytest?
I see they are used extensively in celery unit tests.
There was a problem hiding this comment.
do you need anything else from me?
There was a problem hiding this comment.
is it possible to increase test coverage and if possible to add integration tests as well?
There was a problem hiding this comment.
It's weird that I reduced coverage by this commit - It's just a bugfix with a new unit test that checks it actually fixed the bug (I didn't add any new "logic" to the code itself).
It also feels like a low-level bug that doesn't suit an integration test.
WDYT?
There was a problem hiding this comment.
codecov sometimes do mistakes :D
Observers should not be shared across different instances. Aside from unwanted behavior, this can lead to object leaks (like celery app objects not being garbage collected).