diff options
| author | Asif Saif Uddin <auvipy@gmail.com> | 2023-04-08 22:45:08 +0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-08 22:45:08 +0600 |
| commit | 973dc3790ac25b9da7b6d2641ac72d95470f6ed8 (patch) | |
| tree | 9e7ba02d8520994a06efc37dde05fba722138189 /t/unit/test_messaging.py | |
| parent | 7ceb675bb69917fae182ebdaf9a2298a308c3fa4 (diff) | |
| parent | 2de7f9f038dd62e097e490cb3fa609067c1c3c36 (diff) | |
| download | kombu-py310.tar.gz | |
Merge branch 'main' into py310py310
Diffstat (limited to 't/unit/test_messaging.py')
| -rw-r--r-- | t/unit/test_messaging.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/t/unit/test_messaging.py b/t/unit/test_messaging.py index f8ed437c..4bd467c2 100644 --- a/t/unit/test_messaging.py +++ b/t/unit/test_messaging.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pickle import sys from collections import defaultdict @@ -188,9 +190,8 @@ class test_Producer: def test_enter_exit(self): p = self.connection.Producer() p.release = Mock() - - assert p.__enter__() is p - p.__exit__() + with p as x: + assert x is p p.release.assert_called_with() def test_connection_property_handles_AttributeError(self): |
