Skip to content

Commit

Permalink
pytest: not_called does not exist, use assert_not_called() instead
Browse files Browse the repository at this point in the history
  • Loading branch information
ithinuel committed Feb 17, 2025
1 parent 68e50e9 commit 3a51871
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/unit/test_autoflush.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@
from pyocd.core.exceptions import TransferError
from pyocd.utility.autoflush import Autoflush


@pytest.fixture(scope='function')
def mock_obj():
return mock.Mock()


class TestAutoflush:
def test_flushed(self, mock_obj):
with Autoflush(mock_obj):
Expand All @@ -35,5 +37,4 @@ def test_transfer_err_not_flushed(self, mock_obj):
with pytest.raises(TransferError):
with Autoflush(mock_obj):
raise TransferError("bad joojoo")
assert mock_obj.flush.not_called

mock_obj.flush.assert_not_called()

0 comments on commit 3a51871

Please sign in to comment.