Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pytest_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def stopall(self):
Stop all patchers started by this fixture. Can be safely called multiple
times.
"""
for p in self._patches:
for p in reversed(self._patches):
p.stop()
self._patches[:] = []

Expand Down
1 change: 1 addition & 0 deletions test_pytest_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def test_mock_patches(mock_fs, mock, check_unix_fs_mocked):
mock functionality. We parametrize different mock methods to ensure
all (intended, at least) mock API is covered.
"""
mock_fs(mock)
mocked_rm, mocked_ls = mock_fs(mock)
check_unix_fs_mocked(mocked_rm, mocked_ls)

Expand Down