diff options
Diffstat (limited to 't/unit/test_simple.py')
-rw-r--r-- | t/unit/test_simple.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/t/unit/test_simple.py b/t/unit/test_simple.py index a5cd899a..50ea880b 100644 --- a/t/unit/test_simple.py +++ b/t/unit/test_simple.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from unittest.mock import Mock import pytest @@ -91,9 +93,8 @@ class SimpleBase: def test_enter_exit(self): q = self.Queue('test_enter_exit') q.close = Mock() - - assert q.__enter__() is q - q.__exit__() + with q as x: + assert x is q q.close.assert_called_with() def test_qsize(self): |