Skip to content

Commit 5e99f26

Browse files
authored
Merge pull request #6 from nelchael/fix-deprecation
Replace deprecated verifyNoUnwantedInteractions() with verifyExpectedInteractions()
2 parents 3db07e5 + e18e37e commit 5e99f26

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ To mark *all* test cases at the module level::
3737
pytestmark = pytest.mark.usefixtures('unstub')
3838

3939

40-
All of the following fixtures just export the equivalent mockito function but `unstub()` on teardown. The exception here is `expect` which also calls `verifyNoUnwantedInteractions()`::
40+
All of the following fixtures just export the equivalent mockito function but `unstub()` on teardown. The exception here is `expect` which also calls `verifyExpectedInteractions()`::
4141

4242
when
4343
when2

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ authors = [
1414
]
1515
dependencies = [
1616
"pytest>=6",
17-
"mockito>=1.0.6",
17+
"mockito>=2.0.0",
1818
]
1919
classifiers = [
2020
"Development Status :: 5 - Production/Stable",

pytest_mockito/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@pytest.hookimpl(hookwrapper=True)
1010
def pytest_runtest_call(item):
1111
from mockito import (
12-
unstub, verifyStubbedInvocationsAreUsed, verifyNoUnwantedInteractions
12+
unstub, verifyStubbedInvocationsAreUsed, verifyExpectedInteractions
1313
)
1414

1515
# Let pytest (and other plugins) run the actual test call.
@@ -23,7 +23,7 @@ def pytest_runtest_call(item):
2323
try:
2424
verifyStubbedInvocationsAreUsed()
2525
if "expect" in fixturenames:
26-
verifyNoUnwantedInteractions()
26+
verifyExpectedInteractions()
2727
except Exception as e:
2828
exc = e
2929
finally:

0 commit comments

Comments
 (0)